Equations

No attempts yetTime limit1sMemory limit1024 MB

Problem

Karlas thought of NN non-negative integers. He told his friend Gustavas the sum of the first and the last number, the sum of the second and the last, the sum of the third and the last, and so on, up to the sum of the second-to-last and the last.

He also told Gustavas the sum of all the numbers. Karlas is very good at arithmetic, so from the information he gave, his numbers can always be recovered uniquely.

Given NN, the sums described above (first and last, second and last, and so on), and the sum of all the numbers, help Gustavas find the numbers Karlas thought of.

Input

The first line contains NN, the count of numbers Karlas thought of. Each of the next N1N-1 lines contains, in order, the sum of the first and the last number, the sum of the second and the last, and so on. The last line contains the sum of all the numbers he thought of.

Output

Output NN lines, one of Karlas's numbers per line, in order.

Constraints

  • 3N1,000,0003 \le N \le 1{,}000{,}000
  • Each number is a non-negative integer not exceeding 1,000,000,0001{,}000{,}000{,}000.