#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
while(cin>>n){
vector<int> a(n);
for(int i=0;i<n;++i){
cin>>a[i];
}
if(n==1){
cout<<0<<'\n';
continue;
}
for(int i=0;i<n-1;++i){
cout<<a[i]*(n-1-i)<<' ';
}
cout<<'\n';
}
}