#include<bits/stdc++.h>
using namespace std;
int n;
double f[105][105],ans[105];
inline void solve(){
int l;double tmp;
for(int i=1;i<=n;i++){
l=i;
for(int j=i+1;j<=n;j++){
if(fabs(f[l][i])<fabs(f[j][i]))l=j;
}
if(l!=i)for(int j=i;j<=n+1;j++)swap(f[i][j],f[l][j]);
tmp=f[i][i];
for(int j=i;j<=n+1;j++)f[i][j]/=tmp;
for(int j=i+1;j<=n;j++){
tmp=f[j][i]/f[i][i];
for(int k=i;k<=n+1;k++)f[j][k]-=f[i][k]*tmp;
}
}
for(int i=n;i>=1;i--){
tmp=f[i][n+1];
for(int j=i+1;j<=n;j++)tmp-=ans[j]*f[i][j];{
ans[i]=tmp/f[i][i];
}
}
}
int main(){
cin>>n;
for(int i=1;i<=n;i++){
for(int j=1;j<=n+1;j++){
cin>>f[i][j];
}
}
solve();
for(int i=1;i<=n;i++){
cout<<((int)(ans[i]+0.5))<<" ";
}
}