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