import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
Scanner in
= new Scanner
(System.
in); double mu=0;
int n=in.nextInt();
double[][] x = new double[n][n];
double[][] y = new double[n][n];
double[][] z = new double[n][n];
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++){
x[i][j]=in.nextDouble();;
y[j][i]=x[i][j];
}
}
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++){
for (int p = 0; p < n; p++){
mu += x[i][p]*y[p][j];
}
z[i][j] = mu;
mu = 0;
}
}
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++){
System.
out.
printf("%.1f ",z
[i
][j
]); }
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJU2Nhbm5lciBpbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJZG91YmxlIG11PTA7CiAgICAJaW50IG49aW4ubmV4dEludCgpOwogICAgCWRvdWJsZVtdW10geCA9IG5ldyBkb3VibGVbbl1bbl07CiAgICAJZG91YmxlW11bXSB5ID0gbmV3IGRvdWJsZVtuXVtuXTsKICAgIAlkb3VibGVbXVtdIHogPSBuZXcgZG91YmxlW25dW25dOwogICAgCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKICAgIAkJZm9yIChpbnQgaiA9IDA7IGogPCBuOyBqKyspewogICAgCQkJeFtpXVtqXT1pbi5uZXh0RG91YmxlKCk7OwogICAgCQkJeVtqXVtpXT14W2ldW2pdOwogICAgCQl9CiAgICAJfQogICAgCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKICAgIAkJZm9yIChpbnQgaiA9IDA7IGogPCBuOyBqKyspewogICAgCQkJZm9yIChpbnQgcCA9IDA7IHAgPCBuOyBwKyspewkKICAgIAkJCQltdSArPSB4W2ldW3BdKnlbcF1bal07CiAgICAJCQl9CiAgICAJCQl6W2ldW2pdID0gbXU7CiAgICAJCQltdSA9IDA7CiAgICAJCX0KICAgIAl9CiAgICAJZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspewogICAgCQlmb3IgKGludCBqID0gMDsgaiA8IG47IGorKyl7CiAgICAJCQlTeXN0ZW0ub3V0LnByaW50ZigiJS4xZiAiLHpbaV1bal0pOwogICAgCQl9CiAgICAJCVN5c3RlbS5vdXQucHJpbnRsbigpOwogICAgCX0KCX0KfQ==