while True:
    try:
        N = int(input())  #A行数
        MN = int(input()) #A列B行数
        M = int(input()) #B列数
        A = []
        B = []
        C = []
        for i in range(N):
            An = list(map(int,input().split())) 
            A.append(An)
            C.append([])
        for i in range(MN):
            Bn = list(map(int,input().split()))
            B.append(Bn)
    except:
        break
    else:
        """
     A  [[1, 2, 3], 
         [3, 2, 1]]
     B  [[1, 2], 
         [2, 1], 
         [3, 3]]
     C  [[],[]]
        """
        for n in range(N):
            for m in range(M):
                jj = []
                for mn in range(MN):
                    jj.append( A[n][mn] * B[mn][m] )
                C[n].append(sum(jj))
        
        for i in C:
            print( ' '.join( (map(str,i))) )