Broken Scales
The watermelon seller's scales malfunctioned and can no longer display small weights accurately. However, they still work correctly for larger weights. To work around this issue, the seller decided to weigh all the watermelons in pairs. Naturally, this resulted in n * (n - 1) / 2 weighings, where n is the total number of watermelons.
Your task is to determine the individual weight of each watermelon.
Input
The first line contains a single natural number n (3 ≤ n ≤ 1000), representing the number of watermelons. The following n * (n - 1) / 2 lines each contain one natural number x[i]
(2 ≤ x[i]
≤ 2000), which are the weights of the pairs of watermelons (unordered).
Output
Output a single line with the positive integer weights of the watermelons, separated by spaces, in ascending order. If the input data does not allow for a valid solution, print -1.