import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
Scanner in
= new Scanner
(System.
in); int n = in.nextInt();
double A[][];
A = new double [n][];
for(int i=0; i<n; i++){
A[i] = new double [n];
for(int j=0; j<n; j++){
A[i][j] = in.nextDouble();
}
}
double B[][];
B = new double [n][];
for(int i=0; i<n; i++){
B[i] = new double [n];
for(int j=0; j<n; j++){
B[i][j]=0;
if (i<j){
B[i][j]=10*0.1/((i+1)+(j+1)-1);
}
else{
if (i==j){
B[i][j]=0;
}
else {
B[i][j]=-10*0.1/((i+1)+(j+1)-1);
}
}
}
}
double C[][];
C = new double [n][];
for(int i=0; i<n; i++){
C[i] = new double [n];
for(int j=0; j<n; j++){
C[i][j]=0;
for(int k=0; k<n; k++){
C[i][j]+=A[i][k]*B[k][j];
}
}
}
for(int i=0; i<n; i++){
for(int j=0; j<n; j++){
System.
out.
print(C
[i
][j
]+" "); }
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJU2Nhbm5lciAgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWludCAgbiA9IGluLm5leHRJbnQoKTsKCQlkb3VibGUgQVtdW107CgkJQSA9IG5ldyBkb3VibGUgW25dW107CgkJZm9yKGludCBpPTA7IGk8bjsgaSsrKXsKCQkJQVtpXSA9IG5ldyBkb3VibGUgW25dOyAgIAoJCQlmb3IoaW50IGo9MDsgajxuOyBqKyspewoJCQkJQVtpXVtqXSA9IGluLm5leHREb3VibGUoKTsKCQkJfQoJCX0KCQlkb3VibGUgQltdW107CgkJQiA9IG5ldyBkb3VibGUgW25dW107CgkJZm9yKGludCBpPTA7IGk8bjsgaSsrKXsKCQkJQltpXSA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