#include <bits/stdc++.h>
using namespace std;
void Yes(){cout << "YES\n";}
void No(){cout << "NO\n";}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int N; cin >> N; N++;
    auto nCr = [&](int n,int r) -> long long {
        if(n < 0 || r < 0 || n < r) return 0;
        long long ret = 1;
        for(int i=1; i<=r; i++) ret *= n--,ret /= i;
        return ret;
    };
    vector<long long> F(N);
    for(auto &a : F) cin >> a;

    N--;
    for(int i=0; i<=N; i++){
        if(i) cout << " ";
        long long answer = 0;
        for(int k=0; k<=i; k++){
            if((i-k)%2 == 0) answer += nCr(N-k,i-k)*F.at(k);
            else answer -= nCr(N-k,i-k)*F.at(k);
        }
        cout << answer;
    }
    cout << endl;
}