#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
double p,q;
cin >> n;
double a[n][n], b[n][n], ab[n][n];
for(int i=0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
cin >> a[i][j];
}
}
for(int i=0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
p=i+1; q=j+1;
b[i][j]=1/(p+q-1);
}
}
for(int i=0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
ab[i][j]=0;
for(int p=0; p < n; p++ )
{
ab[i][j]+=a[i][p]*b[p][j];
}
}
}
for(int i=0; i < n; i++)
{
for(int j=0; j < n; j++)
{
cout << ab[i][j] << " ";
}
cout << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewoJaW50ICBuOwoJZG91YmxlIHAscTsKCWNpbiA+PiBuOwoJZG91YmxlIGFbbl1bbl0sIGJbbl1bbl0sIGFiW25dW25dOwoJZm9yKGludCBpPTA7IGkgPCBuOyBpKyspCgl7CgkJZm9yKGludCBqID0gMDsgaiA8IG47IGorKykKCQl7CgkJCWNpbiA+PiBhW2ldW2pdOyAKCQl9Cgl9CiAJZm9yKGludCBpPTA7IGkgPCBuOyBpKyspCgl7CgkJZm9yKGludCBqID0gMDsgaiA8IG47IGorKykKCQl7CgkJIAkgcD1pKzE7IHE9aisxOwoJCSAJYltpXVtqXT0xLyhwK3EtMSk7CQkKCQl9Cgl9Cglmb3IoaW50IGk9MDsgaSA8IG47IGkrKykKCXsKCQlmb3IoaW50IGogPSAwOyBqIDwgbjsgaisrKQoJCXsKCQkJYWJbaV1bal09MDsKCQkJZm9yKGludCBwPTA7IHAgPCBuOyBwKysgKQoJCQl7CgkJCQkgYWJbaV1bal0rPWFbaV1bcF0qYltwXVtqXTsKCQkJfQoJCX0KCX0KCWZvcihpbnQgaT0wOyBpIDwgbjsgaSsrKQoJewoJCWZvcihpbnQgaj0wOyAgaiA8IG47IGorKykKCQl7CgkJCWNvdXQgPDwgYWJbaV1bal0gPDwgIiAiOwoJCX0KCQljb3V0IDw8IGVuZGw7Cgl9CglyZXR1cm4gMDsKfQo=