def xh(ls1,ls2,n,m,k):
g,a,b,h = 0,0,0,[]
for i in range(k):
for j in range(m):
g,a = g + ls1[n][j]*ls2[a][b],a+1
h.append(g)
b,a,g = b + 1,0,0
return h
n,m,k = map(int,input().split())
ls1,ls2,ls = [],[],[]
for i in range(n):
ls1.append(list(map(int,input().split())))
for i in range(m):
ls2.append(list(map(int,input().split())))
for i in range(n):
ls.append(xh(ls1,ls2,i,m,k))
for i in range(n):
for j in range(k):
print(ls[i][j] , end = '' if j == k else ' ')
print()