IntermediateRating 1100
Left and Right Sums
For each index, print the absolute difference between the sum of elements to its left and to its right.
Input
n, then n integers.
Output
One line.
Sample 1
Input
4 10 4 8 3
Output
15 1 11 22
Sample 2
Input
1 1
Output
0
Output appears here