先生成再遍历,求和,并输出

import sys
for line in sys.stdin:
    x=int(line.strip())
    # print(x)
    y,z=int(input()),int(input())
    # print(y,z)
    A=[];B=[]
    for i in range(x):
        A=A+[list(map(int,input().split()))]
    # for item in A:#输出一个矩阵的方式,下同
    #     print(item)
    for i in range(y):
        B=B+[list(map(int,input().split()))]
    # for item in B:
    #     print(item)
    for i in range(x):
        for j in range(z):
            sum=0
            for ii in range(y):
                nn=(A[i][ii])*(B[ii][j])
                # print(nn)
                sum=sum+(nn)
            print(sum,end=' ')
        print()