#include <bits/stdc++.h>
using namespace std;
int main(){
	int n, x=0;
	cin >> n; 
    vector<int> a(n+1,0);
    for(int i=1; i<=n; ++i){
        cin >> a[i];
        x += a[i]-a[i/2*2];
    }
    cout << x << " ";
    for(int i=2; i<=n; ++i){
        x=2*a[i-1]-x;
        cout << x << " ";
    }
	cout << endl;
}