Little Q's factory recently purchased $n$ pieces of new equipment, labeled by $1,2,\dots,n$.
There are $n$ workers in the factory, labeled by $1,2,\dots,n$. Each worker can be assigned to no more than one piece of equipment, and no piece of equipment can be assigned to multiple workers. If Little Q assigns the $i$-th worker to the $j$-th piece of equipment, they will bring $a_i+b_j$ profits. However, these workers are not so experienced, there are $m$ extra constraints. In each constraint, you will be given two integers $u_i$ and $v_i$, denoting the $u_i$-th worker can't be assigned to the $v_i$-th piece of equipment.
Now please for every $k$ ($1\leq k\leq n$) find $k$ pairs of workers and pieces of equipment, then assign workers to these pieces of equipment, such that the total profits for these $k$ pairs are maximized, or determine it is impossible.