r=raw_input g=range while 1: a=[map(int,r().split())] n=len(a[0])/2 for i in g(n-1):a+=[map(int,r().split())] for i in g(n):print" ".join(map(str,[sum(a[i][k]*a[k][n+j] for k in g(n)) for j in g(n)])) r("\n")

Note that non-ascii characters in the above source code will be escaped (such as \x9f).