Farmer John is arranging his cows numbered to for a photoshoot. Initially, he planned for the -th cow from the left to be the cow numbered a_i, and wrote down the permutation a_1, a_2, \ldots, a_n on a piece of paper. Unfortunately, that paper was stolen by Farmer Nhoj.
However, there might still be a chance for Farmer John to recover the permutation he originally wrote down. Before the paper was stolen, Bessie recorded the sequence b_1, b_2, \ldots, b_{n-1}, where b_i = a_i + a_{i+1} holds for each (1 \le i < n).
Based on Bessie's information, help Farmer John restore the lexicographically minimum permutation that could have produced . A permutation is lexicographically smaller than a permutation if, for some , x_i = y_i for all i < j and x_j < y_j (in other words, the two permutations are identical up to a certain point, at which first becomes smaller than ).
It is guaranteed that at least one such permutation exists.
The first line contains a single integer (2 \le n \le 10^3). The second line contains n-1 integers b_1, b_2, \ldots, b_{n-1} separated by spaces.
Print the lexicographically minimum permutation a_1, a_2, \ldots, a_n.
Example 1
For example, produces because 3 + 1 = 4, 1 + 5 = 6, 5 + 2 = 7, and 2 + 4 = 6.