#include<iostream>
const int N = 1010;
using namespace std;
int n;
int a[N],b[N];
int main()
{
cin>>n;
for(int i = 1; i<=n; i++) cin>>a[i];
b[1] = (a[1]+a[2])/2;
b[n] = (a[n]+a[n-1])/2;
for(int i = 2; i<n; i++)
b[i] = (a[i]+a[i-1]+a[i+1])/3;
for(int i = 1; i<=n; i++) cout<<b[i]<<' ';
return 0;
}