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

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

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

for ARow in A:

    result = []

    for BCol in zip(*B):

        result.append(sum([ARow[i] * BCol[i] for i in range(m)]))

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

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

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

for ARow in A:

    result = []

    for BCol in zip(*B):

        result.append(sum([a * b for (a,b) in zip(ARow, BCol)]))

    print((*result))
n, m, l = list(map(int, input().split()))
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
for ARow in A:
    result = []
    for BCol in zip(*B):
        result.append(sum([ARow[i] * BCol[i] for i in range(m)]))
    print((*result))

n, m, l = list(map(int, input().split()))
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
for ARow in A:
    result = []
    for BCol in zip(*B):
        result.append(sum([a * b for (a, b) in zip(ARow, BCol)]))
    print((*result))

-        result.append(sum([ARow[i] * BCol[i] for i in range(m)])) +        result.append(sum([a * b for (a, b) in zip(ARow, BCol)]))