Problem Description

Jianzhi is playing with arrays today. He first generates an integer array A, of length N, in his mind.

He decides this array is too boring, so he decides to flip it. He generates a new array B, where the element Bi is the sum of all elements in A, excluding Ai.

Given the array B, Jianzhi wonders if you can find the array A. It is guaranteed that at least one such array exists.

Limits

Subtask 1 (19%): 2 ≤ N ≤ 2000, 1 ≤ Ai ≤ 106.

Subtask 2 (23%): 2 ≤ N ≤ 2000. |Ai| ≤ 106.

Subtask 3 (27%): 2 ≤ N ≤ 500000, 1 ≤ Ai ≤ 106.

Subtask 4 (31%): 2 ≤ N ≤ 500000, |Ai| ≤ 106.

Subtask 5 (0%): Sample Testcases.

Do take note that the integers in array B will exceed the size of an int.

Input

The first line of input will contain one integer, N.

The second line of input will contain N integers, representing the array B.

Output

The output should contain N integers, one on each line, representing the array A.

Sample Testcase 1

Input

3
4 5 3

Output

2
1
3

Sample Testcase 2

Input

4
-15 -3 -12 0

Output

5
-7
2
-10