int main()
{
int arr[1000],n,i,j,k,left,right,maximum_sum,current_sum;
left=-1;
right=-1;
maximum_sum=0;
current_sum=0;
cin>>n;
for(i=0;i<=n-1;i++){
cin>>arr[i];
}
for(i=0;i<=n-1;i++)
{
for(j=i;j<=n-1;j++)
{
for(k=i;k<=j;k++)
current_sum+=arr[k];
}
cout<<current_sum<<endl;
}
return 0;
}