#CCBCHBAHAI0000069. Tổng từng cặp đối xứng (Sums of Symmetric Pairs)
Tổng từng cặp đối xứng (Sums of Symmetric Pairs)
Sums of Symmetric Pairs (Tổng từng cặp đối xứng)
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem
Given , let
For every , define
If is odd, keep the unpaired middle element unchanged:
Thus the result length is . Print .
Input
The first line contains . The second line contains integers .
Output
Print the integers of on one line.
Subtask
Subtask 1 (20 points): , .
Subtask 2 (30 points): , .
Subtask 3 (50 points): , .
Example
Input
7
2 5 -1 8 4 9 3
Output
5 14 3 8
Explanation
The sample follows the mathematical definition above.