#include <iostream>
using namespace std;
int main(){ int n, sum = 0, contor=0, vect[201]; cin>>n; for (int i=1; i<=n; i++) { cin>>vect[i]; if (vect[i]) { sum+=vect[i]; contor++; } }
for (int i=1; i<=n; i++) { if (!vect[i]) vect[i]=sum/contor; cout<<vect[i]<<" "; }
return 0;}