FJ gave Bessie an array $a$ of length $N$ $(2 \leq N \leq 500, -10^{15} \leq a_i \leq 10^{15})$ with all $\frac{N(N+1)}2$ contiguous subarray sums distinct. For each index $i \in [1, N]$, help Bessie compute the minimum amount it suffices to change $a_i$ by so that there are two different contiguous subarrays of $a$ with equal sum.
输入格式
The first line contains $N$.
The next line contains $a_1, \ldots, a_N$ (the elements of $a$, in order).
输出格式
One line for each index $i \in [1, N]$.
样例输入 #1
2
2 -3
样例输出 #1
2
3
样例输入 #2
3
3 -10 4
样例输出 #2
1
6
1
提示
**For Example #1:**
Decreasing $a_1$ by $2$ would result in $a_1+a_2=a_2$. Similarly, increasing $a_2$ by $3$ would result in $a_1+a_2=a_1$.
**For Example #2:**
Increasing $a_1$ or decreasing $a_3$ by $1$ would result in $a_1=a_3$. Increasing $a_2$ by $6$ would result in $a_1=a_1+a_2+a_3$.