Sum of Numbers 3

Time limit2sMemory limit128 MB

Problem

There are $N$ integers. Taking every unordered pair of positions and adding the two chosen numbers yields $\frac{N(N-1)}{2}$ sums in total. Given these $\frac{N(N-1)}{2}$ sums, write a program that recovers the original $N$ numbers.

Input

The first line contains an integer $N$ ($2 \le N \le 100$).

The second line contains the $\frac{N(N-1)}{2}$ sums separated by spaces. Each sum is an integer whose absolute value is at most $1,000,000$, and they are given in no particular order.

Output

Print, on one line separated by spaces, $N$ numbers in non-decreasing order whose pairwise sums are exactly the given multiset.

If more than one such sequence exists, print only the lexicographically smallest one. (List each candidate in non-decreasing order and compare them element by element from the front; the sequence with the smaller value at the first differing position is lexicographically smaller.)

Every printed integer must lie between $-100,000,000$ and $100,000,000$. If no sequence within this range satisfies the condition, print Impossible.