There are $*n*$ integers $*b*_{1}, *b*_{2}, ..., *b*_{*n*}$ written in a row. For all $*i*$ from $1$ to $*n*$, values $*a*_{*i*}$ are defined by the crows performing the following procedure:
- The crow sets
$*a*_{*i*}$initially$0$. - The crow then adds
$*b*_{*i*}$to$*a*_{*i*}$, subtracts$*b*_{*i* + 1}$, adds the$*b*_{*i* + 2}$number, and so on until the$*n*$'th number. Thus,$*a*_{*i*} = *b*_{*i*} - *b*_{*i* + 1} + *b*_{*i* + 2} - *b*_{*i* + 3}...$.
Memory gives you the values $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$, and he now wants you to find the initial numbers $*b*_{1}, *b*_{2}, ..., *b*_{*n*}$ written in the row? Can you do it?
Input
The first line of the input contains a single integer $*n*$ ($2 ≤ *n* ≤ 100 000$) — the number of integers written in the row.
The next line contains $*n*$, the $*i*$'th of which is $*a*_{*i*}$ ($- 10^{9} ≤ *a*_{*i*} ≤ 10^{9}$) — the value of the $*i*$'th number.
Output
Print $*n*$ integers corresponding to the sequence $*b*_{1}, *b*_{2}, ..., *b*_{*n*}$. It's guaranteed that the answer is unique and fits in 32-bit integer type.
Note
In the first sample test, the crows report the numbers $6$,$- 4$, $8$,$- 2$, and $3$ when he starts at indices $1$, $2$, $3$, $4$ and $5$ respectively. It is easy to check that the sequence $2$ $4$ $6$ $1$ $3$ satisfies the reports. For example, $6 = 2 - 4 + 6 - 1 + 3$, and $- 4 = 4 - 6 + 1 - 3$.
In the second sample test, the sequence $1$, $- 3$, $4$, $11$, $6$ satisfies the reports. For example, $5 = 11 - 6$ and $6 = 6$.
样例
5
6 -4 8 -2 3
2 4 6 1 3
5
3 -2 -1 5 6
1 -3 4 11 6
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。