n,m,l=map(int,input().split())

a=[list(map(int,input().split()))for _ in range(n)]

b=[list(map(int,input().split()))for _ in range(m)]

[print(*x)for x in[[sum([s*t for s,t in zip(c,l)])for l in zip(*b)]for c in a]]

n,m,l=list(map(int,input().split()))

a=[list(map(int,input().split()))for _ in range(n)]

b=[list(map(int,input().split()))for _ in range(m)]

for x in[[sum([s*t for s,t in zip(c,l)])for l in zip(*b)]for c in a]:print((*x))

n, m, l = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(n)]
b = [list(map(int, input().split())) for _ in range(m)]
[print(*x) for x in [[sum([s * t for s, t in zip(c, l)]) for l in zip(*b)] for c in a]]

n, m, l = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]
b = [list(map(int, input().split())) for _ in range(m)]
for x in [[sum([s * t for s, t in zip(c, l)]) for l in zip(*b)] for c in a]:
    print((*x))

-n, m, l = map(int, input().split()) +n, m, l = list(map(int, input().split())) -[print(*x) for x in [[sum([s * t for s, t in zip(c, l)]) for l in zip(*b)] for c in a]] +for x in [[sum([s * t for s, t in zip(c, l)]) for l in zip(*b)] for c in a]: +    print((*x))