#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int n, x;
double a[55][55];
const double eps=1e-7;
void gauss(){
for(int i=1; i<=n; i++){
int maxi=i;
for(int j=i+1; j<=n; j++)
if(a[j][i]>a[maxi][i])
maxi = j;
swap(a[maxi], a[i]);
double now=a[i][i];
if(fabs(now)<eps) continue;
for(int j=i; j<=n+1; j++)
a[i][j] /= now;
for(int j=1; j<=n; j++)
if(i!=j){
now = a[j][i];
for(int k=i; k<=n+1; k++)
a[j][k] -= now * a[i][k];
}
}
bool wj=false, oo=false;
for(int i=1; i<=n; i++){
int j=1;
while(j<=n+1 && fabs(a[i][j])<eps) j++;
if(j==n+1) wj = true;//倘若是0..0..0....x则无解
if(j>n+1) oo = true;//倘若是0..0..0....0则无穷解
}
if(wj) printf("-1
");//只要敢有无解的整个方程就无解
else if(oo) printf("0
");
else
for(int i=1; i<=n; i++)
if(fabs(a[i][n+1])<eps) printf("x%d=0
", i);
else printf("x%d=%.2lf
", i, a[i][n+1]);
}
int main(){
cin>>n;
for(int i=1; i<=n; i++)
for(int j=1; j<=n+1; j++){
scanf("%d", &x);
a[i][j] = x;
}
gauss();
return 0;
}