#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
double A[n][n];
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cin >> A[i][j];
}
}
double B[n][n];
for(int i = 0; i < n; i++){
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[n][n];
for(int i = 0; i < n; i++){
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++){
cout << C[i][j] << " ";
}
cout << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgogCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKaW50IG1haW4oKSB7CglpbnQgbjsKCWNpbiA+PiBuOwoJZG91YmxlIEFbbl1bbl07Cglmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKCQlmb3IoaW50IGogPSAwOyBqIDwgbjsgaisrKXsKCQkJY2luID4+IEFbaV1bal07CgkJfQoJfQogCglkb3VibGUgQltuXVtuXTsKCWZvcihpbnQgaSA9IDA7IGkgPCBuOyBpKyspewoJCWZvcihpbnQgaiA9IDA7IGogPCBuOyBqKyspewoJCQlCW2ldW2pdID0gMDsKCQkJaWYgKGkgPCBqKXtCW2ldW2pdID0gMTAgKiAwLjEgLyAoKGkrMSkgKyAoaisxKSAtMSk7fQoJCQllbHNlIHsKCQkJCWlmIChpID09IGope0JbaV1bal0gPSAwO30KCQkJCWVsc2Uge0JbaV1bal0gPSAtMTAgKiAwLjEgLyAoKGkrMSkgKyAoaisxKSAtMSk7fQoJCQl9CQoJCX0KCX0KIAoJZG91YmxlIENbbl1bbl07Cglmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKCQlmb3IoaW50IGogPSAwOyBqIDwgbjsgaisrKXsKCQkJQ1tpXVtqXSA9IDA7CgkJCWZvcihpbnQgayA9IDA7IGsgPCBuOyBrKyspewoJCQkJQ1tpXVtqXSArPSBBW2ldW2tdICogQltrXVtqXTsKCQkJfQoJCX0KCX0KCglmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKCQlmb3IoaW50IGogPSAwOyBqIDwgbjsgaisrKXsKCQkJY291dCA8PCBDW2ldW2pdIDw8ICIgIjsKCQl9CgkJY291dCA8PCBlbmRsOwoJfQogCglyZXR1cm4gMDsKfQ==