# -*- coding: UTF-8 -*-
n = map(int,raw_input().strip().split())
a=[[0] * n[1] for row in range(n[0])]
for i in range(n[0]):
t = map(int,raw_input().strip().split())
a[i]=t
b=[[0] * n[2] for row in range(n[1])]
for i in range(n[1]):
t = map(int,raw_input().strip().split())
b[i]=t
#大大
for i in range(n[0]):
new=""
for j in range(n[2]):
num=0
for k in range(n[1]):
num+=int(a[i][k])*int(b[k][j])
if new!="":
new=new+" "+str(num)
else:
new=str(num)
print new