n,m,k=map(int,raw_input().strip().split())
li1=[]
li2=[]
li=[[0 for i in range(k)] for j in range(n)]
for i in range(n):
li1.append(map(int,raw_input().strip().split()))
for j in range(m):
li2.append(map(int,raw_input().strip().split()))
for i in range(n):
for h in range(k):
for j in range(m):
li[i][h]+=li1[i][j]*li2[j][h]
print li[i][h],
print