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