qyliang/CodeNanoFix huggingface dataset:
Buggy code:
(n, m, l) = [int(i) for i in input().split()]
print(n)
A = []
for nc in range(n):
    A.append([int(i) for i in input().split()])
B = []
for mc in range(m):
    B.append([int(i) for i in input().split()])

product = [[0 for d in range(l)] for dd in range(n)]

for nc in range(n):
    for lc in range(l):
        for mc in range(m):
            product[nc][lc] += A[nc][mc] * B[mc][lc]

for r in product:
    print(' '.join([str(d) for d in r]))

Fixed code:
(n, m, l) = [int(i) for i in input().split()]
A = []
for nc in range(n):
    A.append([int(i) for i in input().split()])
B = []
for mc in range(m):
    B.append([int(i) for i in input().split()])

product = [[0 for d in range(l)] for dd in range(n)]

for nc in range(n):
    for lc in range(l):
        for mc in range(m):
            product[nc][lc] += A[nc][mc] * B[mc][lc]

for r in product:
    print(' '.join([str(d) for d in r]))
Buggy code:
n, m, l = (int(i) for i in input().split())
A = []
B = []
#C = [[0] * n] * l
C = [[0 for i in range(l)] for j in range(n)]
print(C)
#??\?????????????????????????´?
for i in range(n):
    #swap_list = input().split()
    #A.append(swap_list)
    A.append([int(i) for i in input().split()])
for i in range(m):
    #swap_list = input().split()
    #B.append(swap_list)
    B.append([int(i) for i in input().split()])
#????????????????¨????
for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]
#?????????????????????
#for i in range(n):
#    for j in range(l):
#        print("{0}".format(C[i][j]), end="\b")
#    print("")
for i in range(n):
    print(" ".join(map(str, C[i][:])))
#for r in C:
#    print(" ".join([str(d) for d in r]))

Fixed code:
n, m, l = (int(i) for i in input().split())
A = []
B = []
C = [[0 for i in range(l)] for j in range(n)]
#??\?????????????????????????´?
for i in range(n):
    swap_list = input().split()
    A.append(swap_list)
    #A.append([int(i) for i in input().split()])
for i in range(m):
    swap_list = input().split()
    B.append(swap_list)
    #B.append([int(i) for i in input().split()])
#????????????????¨????
for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += int(A[i][k]) * int(B[k][j])
#?????????????????????
#for i in range(n):
#    for j in range(l):
#        print("{0}".format(C[i][j]), end="\b")
#    print("")
for i in range(n):
    print(" ".join(map(str, C[i][:])))
#for r in C:
#    print(" ".join([str(d) for d in r]))
Buggy code:
#Input
n,m,l = 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)]

c = [list(sum([A[i][k] * B[k][j] for k in range(m)]) for j in range(l)) for i in range(n)]

#Output
for i in c:
    print(*c)

Fixed code:
#Input
n,m,l = 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)]

c = [list(sum([A[i][k] * B[k][j] for k in range(m)]) for j in range(l)) for i in range(n)]

#Output
for i in c:
    print(*i)
Buggy code:
n, m, l = map(int, input().split()) # n = 3, c = 2, l = 3

a_matrix = [list(map(int, input().split())) for row in range(n)] # [[1, 2], [0, 3], [4, 5]]
b_matrix = [list(map(int, input().split())) for row in range(m)] # [[1, 2, 1], [0, 3, 2]]

result_matrix = [[0 for x in range(l)] for y in range(n)] # [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
print(result_matrix)
for i in range(n):
	for j in range(l):
		for k in range(m):
			result_matrix[i][j] += a_matrix[i][k] * b_matrix[k][j]

for i in range(n):
	print(' '.join(map(str, result_matrix[i])))

Fixed code:
n, m, l = map(int, input().split()) # n = 3, c = 2, l = 3

a_matrix = [list(map(int, input().split())) for row in range(n)] # [[1, 2], [0, 3], [4, 5]]
b_matrix = [list(map(int, input().split())) for row in range(m)] # [[1, 2, 1], [0, 3, 2]]

result_matrix = [[0 for x in range(l)] for y in range(n)] # [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
for i in range(n):
	for j in range(l):
		for k in range(m):
			result_matrix[i][j] += a_matrix[i][k] * b_matrix[k][j]

for i in range(n):
	print(' '.join(map(str, result_matrix[i])))
Buggy code:
n, m, l, = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        C[i].append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]

for li in range(n):
    print(" ".join([str(s) for s in C[ni]]))

Fixed code:
n, m, l = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        C[i].append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]
for ni in range(n):
    print(" ".join([str(s) for s in C[ni]]))
Buggy code:
NML = input().split()
n = int(NML[0])
m = int(NML[1])
l = int(NML[2])

A = []
B = []
for i in range(n):
    A.append([])
    A_r = input().split()
    for j in range(m):
        A[i].append(int(A_r[j]))
for i in range(m):
    B.append([])
    B_r= input().split()
    for j in range(l):
        B[i].append(int(B_r[j]))
for i in range(n):
    for j in range(l):
        out=0
        for k in range(m):
            out +=A[i][k]*B[k][j]
        print(str(out)+" ",end="")
    print("")

Fixed code:
NML = input().split()
n = int(NML[0])
m = int(NML[1])
l = int(NML[2])

A = []
B = []
for i in range(n):
    A.append([])
    A_r = input().split()
    for j in range(m):
        A[i].append(int(A_r[j]))
for i in range(m):
    B.append([])
    B_r= input().split()
    for j in range(l):
        B[i].append(int(B_r[j]))
for i in range(n):
    for j in range(l):
        out=0
        for k in range(m):
            out +=A[i][k]*B[k][j]
        print(str(out),end="")
        if j != l-1:
            print(" ",end="")
    print("")
Buggy code:
n, m, l = map(int, input().split())
A = []
B = []
C = [[0] * l for i in range(n)]
for x in range(n):
	A[x].append(list(map(int, input().split())))

for x in range(m):
	B[x].append(list(map(int, input().split())))

for x in range(n):
	for y in range(l):
		sum = 0
		for z in range(m):
			sum += A[x][z] * B[z][y]
		C[x][y] = sum

for x in range(n):
	for y in range(l-1):
		print("{0} ".format(C[x][y]), end = '')
	print(C[x][l-1])

		

Fixed code:
n, m, l = map(int, input().split())
A = []
B = []
C = [[0] * l for i in range(n)]
for x in range(n):
	A.append(list(map(int, input().split())))

for x in range(m):
	B.append(list(map(int, input().split())))

for x in range(n):
	for y in range(l):
		sum = 0
		for z in range(m):
			sum += A[x][z] * B[z][y]
		C[x][y] = sum

for x in range(n):
	for y in range(l-1):
		print("{0} ".format(C[x][y]), end = '')
	print(C[x][l-1])
Buggy code:
A = []
B = []
C = []
n, m, l = map(int, input().strip().split())
[A.append(list(map(int, input().strip().split()))) for x in range(n)]
[B.append(list(map(int, input().strip().split()))) for y in range(m)]
[C.append([0 for zz in range(l)]) for z in range(n)]

for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k]*B[k][j]
        print(C[i][j],end=' ')
    print()

Fixed code:
A = []
B = []
C = []
n, m, l = map(int, input().strip().split())
[A.append(list(map(int, input().strip().split()))) for x in range(n)]
[B.append(list(map(int, input().strip().split()))) for y in range(m)]
[C.append([0 for zz in range(l)]) for z in range(n)]

for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k]*B[k][j]
        if j == l - 1:
            print(C[i][j])
        else:
            print(C[i][j],end=' ')
Buggy code:
n,m,l=map(int,input().split())
a=[]
b=[]
for i in range(n):
    a+=[list(map(int,input().split()))]

for i in range(m):
    b+=[list(map(int,input().split()))]
print(a,b)    
c=[]
c=[[sum(a[i][k]*b[k][j] for k in range(m))for j in range(l)] for i in range(n)]
[print(" ".join(list(map(str,c[i])))) for i in range(n)]

Fixed code:
[n, m, l] = 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)]

c = [[sum([a[i][k]*b[k][j] for k in range(m)]) for j in range(l)] for i in range(n)]
for i in range(n):
    print(" ".join(list(map(str, c[i]))))
Buggy code:
n,m,l = [int(i) for i in input().split()]
a = [[0 for i in range(m)] for j in range(n)]
b = [[0 for i in range(l)] for j in range(m)]
for i in range(n):
	a[i] = [int(j) for j in input().split()]
for i in range(m):
	b[i] = [int(j) for j in input().split()]
c = [[0 for i in range(l)] for j in range(n)]
for i in range(n):
	for j in range(l):
		for k in range(m):
			c[i][j] += a[i][k] * b[k][j]
		print(c[i][j],end=' ')
	print()

Fixed code:
n,m,l = [int(i) for i in input().split()]
a = [[0 for i in range(m)] for j in range(n)]
b = [[0 for i in range(l)] for j in range(m)]
for i in range(n):
	a[i] = [int(j) for j in input().split()]
for i in range(m):
	b[i] = [int(j) for j in input().split()]
c = [[0 for i in range(l)] for j in range(n)]
for i in range(n):
	for j in range(l):
		for k in range(m):
			c[i][j] += a[i][k] * b[k][j]
for i in range(n):
	for j in range(l-1):
		print(c[i][j],end=' ')
	print(c[i][l-1])
Buggy code:
# coding: utf-8
# Here your code !
 
def func():
    try:
        (n,m,l) = [ int(item) for item in input().rstrip().split(" ") ]
        matrix_A = [ [ int(item) for item in input().rstrip().split(" ") ] for i in range(n) ]
        matrix_B = [ [ int(item) for item in input().rstrip().split(" ") ] for i in range(m) ]
    except:
        return inputError()
        
    matrix_C = [ [ sum([ matrix_A[i][j]*matrix_B[j][k] for j in range(m) ]) for k in range(l) ] for i in range(n) ]
    result=""

    for vector in matrix_C:
        for item in vector:
            result+=str(item)+" "
        result.rstrip()
        result+="\n"
    print(result.rstrip())

def inputError():
    '''
    print("input Error")
    return -1
    '''
 
    print("input Error")
    return -1
     
func()

Fixed code:
# coding: utf-8
# Here your code !
 
def func():
    try:
        (n,m,l) = [ int(item) for item in input().rstrip().split(" ") ]
        matrix_A = [ [ int(item) for item in input().rstrip().split(" ") ] for i in range(n) ]
        matrix_B = [ [ int(item) for item in input().rstrip().split(" ") ] for i in range(m) ]
    except:
        return inputError()
        
    matrix_C = [ [ sum([ matrix_A[i][j]*matrix_B[j][k] for j in range(m) ]) for k in range(l) ] for i in range(n) ]
    result=""

    for vector in matrix_C:
        for item in vector:
            result+=str(item)+" "
        result=result.rstrip()
        result+="\n"
    print(result.rstrip())

def inputError():
    '''
    print("input Error")
    return -1
    '''
 
    print("input Error")
    return -1
     
func()
Buggy code:
n,m,l=list(map(int,input().split()))

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

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

for i in range(n):
    for k in range(l):
        s=0
        for j in range(m):
            s+=m_A[i][j]*m_B[j][k]
        print(s)

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

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

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

for i in range(n):
    t=[]
    for k in range(l):
        s=0
        
        for j in range(m):
            s+=m_A[i][j]*m_B[j][k]
        t.append(s)
    print(*t)
Buggy code:
n,m,l = map(int,input().split())
A = [[int(i) for i in input().split()] for j in range(n)]
B = [[int(i) for i in input().split()] for j in range(m)]
C = [[0 for i in range(n)] for k in range(l)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k]*B[k][j]
cnt=0
for i in range(n):
    for j in C[i]:
        cnt += 1
        if i == n-1 and cnt == n*l:
            print(j,end="")
        else:
            print(j,end=" ")
    print()

Fixed code:
n, m, l = map(int, input().split())
A = [[int(n) for n in input().split()] for i in range(n)]
B = [[int(n) for n in input().split()] for i in range(m)]
C = [[0 for i in range(l)] for i in range(n)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]
for i in range(n):
    for j in range(l):
        if j == l - 1:
            print(C[i][j])
        else:
            print(C[i][j], end = " ")
Buggy code:
n, m, l = map(int, input().split())

nm = []
ml = []

for _ in range(n):
	lista = list(map(int, input().split()))
	nm.append(lista)

for _ in range(m):
	lista = list(map(int, input().split()))
	ml.append(lista)
	
matrix = []

print(nm)
print(ml)

for i in range(n):
	lista = []
	for j in range(l):
		sum = 0
		for k in range(m):
			sum += nm[i][k]*ml[k][j]
		lista.append(sum)
	matrix.append(lista)

for i in range(n):
	text = ""
	for j in range(l):
		text += str(matrix[i][j]) + " "
	print(text[:-1])

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

nm = []
ml = []

for _ in range(n):
	lista = list(map(int, input().split()))
	nm.append(lista)

for _ in range(m):
	lista = list(map(int, input().split()))
	ml.append(lista)
	
matrix = []

for i in range(n):
	lista = []
	for j in range(l):
		sum = 0
		for k in range(m):
			sum += nm[i][k]*ml[k][j]
		lista.append(sum)
	matrix.append(lista)

for i in range(n):
	text = ""
	for j in range(l):
		text += str(matrix[i][j]) + " "
	print(text[:-1])
Buggy code:
I = input().split()
n = int(I[0])
m = int(I[1])
l = int(I[2])

a = [[0 for i2 in range(m)] for i1 in range(n)]
b = [[0 for i2 in range(l)] for i1 in range(m)]
c = [[0 for i2 in range(l)] for i1 in range(n)]

for i in range(n):
    A = input().split()
    for j in range(m):
        a[i][j] = int(A[j])

for i in range(m):
    B = input().split()
    for j in range(l):
        b[i][j] = int(B[j])

for i in range(n):
    for j in range(l):
        for k in range(m):
            c[i][j] += a[i][k] * b[k][j]
        print(str(c[i][j]), end = '')
        if i != n - 1 or j != l - 1:
            print(' ', end = '')
    if i != n - 1 or j != l - 1:
        print()

Fixed code:
I = input().split()
n = int(I[0])
m = int(I[1])
l = int(I[2])

a = [[0 for i2 in range(m)] for i1 in range(n)]
b = [[0 for i2 in range(l)] for i1 in range(m)]
c = [[0 for i2 in range(l)] for i1 in range(n)]

for i in range(n):
    A = input().split()
    for j in range(m):
        a[i][j] = int(A[j])

for i in range(m):
    B = input().split()
    for j in range(l):
        b[i][j] = int(B[j])

for i in range(n):
    for j in range(l):
        for k in range(m):
            c[i][j] += a[i][k] * b[k][j]
        print(str(c[i][j]), end = '')
        if j != l - 1:
            print(' ', end = '')
    print()
Buggy code:
import sys
s=input().split()
n=int(s[0]);m=int(s[1]);l=int(s[2])
a=[[0 for j in range(m)]for i in range(n)]
b=[[0 for j in range(l)]for i in range(m)]
c=[[0 for j in range(l)]for i in range(n)]
for i in range(n):
    t=input().split()
    for j in range(m):
        a[i][j]=int(t[j])
for i in range(m):
    t=input().split()
    for j in range(l):
        b[i][j]=int(t[j])
for i in range(n):
    for j in range(l):
        for k in range(m):
            c[i][j]+=a[i][k]*b[k][j]
        sys.stdout.write("{0} ".format(c[i][j]))
    sys.stdout.write("\n")

Fixed code:
import sys
s=input().split()
n=int(s[0]);m=int(s[1]);l=int(s[2])
a=[[0 for j in range(m)]for i in range(n)]
b=[[0 for j in range(l)]for i in range(m)]
c=[[0 for j in range(l)]for i in range(n)]
for i in range(n):
    t=input().split()
    for j in range(m):
        a[i][j]=int(t[j])
for i in range(m):
    t=input().split()
    for j in range(l):
        b[i][j]=int(t[j])
for i in range(n):
    for j in range(l):
        for k in range(m):
            c[i][j]+=a[i][k]*b[k][j]
        sys.stdout.write("{0}".format(c[i][j]))
        if j==l-1:
            sys.stdout.write("\n")
        else:
            sys.stdout.write(" ")
Buggy code:
import sys

(n, m, l) = sys.stdin.readline().rstrip('\r\n').split(' ')
n = int(n)
m = int(m)
l = int(l)

a = []
b = []
c = []
for ii in range(n):
  a.append([int(x) for x in input().rstrip('\r\n').split(' ')])

for ii in range(m):
  b.append([int(x) for x in input().rstrip('\r\n').split(' ')])

for ii in range(n):
  c.append([])
  for jj in range(l):
    c[ii].append(0)
    for kk in range(m):
      c[ii][jj] += a[ii][kk] * b[kk][jj]
    print(str(c[ii][jj]) + ' ', end='')



Fixed code:
import sys

(n, m, l) = sys.stdin.readline().rstrip('\r\n').split(' ')
n = int(n)
m = int(m)
l = int(l)

a = []
b = []
c = []
for ii in range(n):
  a.append([int(x) for x in input().rstrip('\r\n').split(' ')])

for ii in range(m):
  b.append([int(x) for x in input().rstrip('\r\n').split(' ')])

for ii in range(n):
  c.append([])
  for jj in range(l):
    c[ii].append(0)
    for kk in range(m):
      c[ii][jj] += a[ii][kk] * b[kk][jj]
    c[ii][jj] = str(c[ii][jj])
  print(' '.join(c[ii]))
Buggy code:
n, m, l = map(int, input().split())
a = []
b = []
c = []
for i in range(n):
    c.append([0 for k in range(l)])
for i in range(n):
    a.append(list(map(int, input().split())))
for i in range(m):
    b.append(list(map(int, input().split())))
for s in range(n):
    for t in range(m):
        elm = 0
        for u in range(l):
            elm += a[s][t] * b[t][u]
        c[s][t] = elm
for i in c:
    print(" ".join(map(str, i)))


Fixed code:
n, m, l = map(int, input().split())
a = []
b = []
c = []
for i in range(n):
    c.append([0 for k in range(l)])
for i in range(n):
    a.append(list(map(int, input().split())))
for i in range(m):
    b.append(list(map(int, input().split())))
for s in range(n):
    for t in range(l):
        elm = 0
        for u in range(m):
            elm += a[s][u] * b[u][t]
        c[s][t] = elm
for i in c:
    print(" ".join(map(str, i)))
Buggy code:
n, m, l = map(int, input().split())
mat_a = []
mat_b = []

for i in range(n):
    mat_a.append(list(map(int, input().split())))
    
for j in range(m):
    mat_b.append(list(map(int, input().split())))
    
for p in range(n):
    sum = 0
    mat_c = []
    for q in range(l):
        for r in range(m):
            sum += mat_a[p][r] * mat_b[r][q]
        mat_c.append(sum)
    print(' '.join(map(str, mat_c)))





Fixed code:
n, m, l = map(int, input().split())
mat_a = []
mat_b = []

for i in range(n):
    mat_a.append(list(map(int, input().split())))
    
for j in range(m):
    mat_b.append(list(map(int, input().split())))
    
for p in range(n):
    mat_c = []
    for q in range(l):
        sum = 0
        for r in range(m):
            sum += mat_a[p][r] * mat_b[r][q]
        mat_c.append(sum)
    print(' '.join(map(str, mat_c)))
Buggy code:
n, m, l = map(int,input().split())

x = []
y = []

for i in range(n):
    a = list(map(int,input().split()))
    x.append(a)
    
for i in range(m):
    b = list(map(int,input().split()))
    y.append(b)

#print(x)
a = 0
b = []
ans = []

for i in range(n):
    for j in range(m):
        for k in range(l):
            a += x[i][k]*y[k][j]
        #print(a)
        b.append(a)
        a = 0
    b = list(map(str, b))
    b = ' '.join(b)
    ans.append(b)
    b = []
        
[print(ans[i]) for i in range(len(ans))]


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

x = []
y = []

for i in range(n):
    a = list(map(int,input().split()))
    x.append(a)
    
for i in range(m):
    b = list(map(int,input().split()))
    y.append(b)

#print(x)
a = 0
b = []
ans = []

for i in range(n):
    for j in range(l):
        for k in range(m):
            a += x[i][k]*y[k][j]
        #print(a)
        b.append(a)
        a = 0
    b = list(map(str, b))
    b = ' '.join(b)
    ans.append(b)
    b = []
        
[print(ans[i]) for i in range(len(ans))]
Buggy code:
# -*- coding: utf-8 -*-

n, m, l = list(map(int, input().split()))
a = []
b = []

for i in range(n):
    a.append(list(map(int, input().split())))

for i in range(m):
    b.append(list(map(int, input().split())))

for i in range(n):
    for j in range(l):
        mat_sum = 0
        for k in range(m):
            mat_sum += a[i][k] * b[k][j]
        print('{0} '.format(mat_sum), end='')
    print()


Fixed code:
# -*- coding: utf-8 -*-

n, m, l = list(map(int, input().split()))
a = []
b = []

for i in range(n):
    a.append(list(map(int, input().split())))

for i in range(m):
    b.append(list(map(int, input().split())))

for i in range(n):
    for j in range(l):
        mat_sum = 0
        for k in range(m):
            mat_sum += a[i][k] * b[k][j]
        if j == l - 1:
            print('{0}'.format(mat_sum), end='')
        else:
            print('{0} '.format(mat_sum), end='')
    print()
Buggy code:
n, m, l = 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)]
Sum = []
key = 0
for i in range(n):
    Sum_s = []
    for j in range(l):
        key = 0
        for k in range(m):
            key += A[i][k] * B[k][j]
        Sum_s.append(key)
    Sum.append(Sum_s)
print(Sum)
for i in range(n):
    for j in range(l - 1):
        print(Sum[i][j], end = ' ')
    print(Sum[i][l - 1])



Fixed code:
n, m, l = 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)]
Sum = []
key = 0
for i in range(n):
    Sum_s = []
    for j in range(l):
        key = 0
        for k in range(m):
            key += A[i][k] * B[k][j]
        Sum_s.append(key)
    Sum.append(Sum_s)
for i in range(n):
    for j in range(l - 1):
        print(Sum[i][j], end = ' ')
    print(Sum[i][l - 1])
Buggy code:
n,m,l=map(int,input().split())
A=[]
B=[]

for i in range(n):A.append(list(map(int,input().split())))
for i in range(m):B.append(list(map(int,input().split())))

for A_r in A:
  print("".join(map(str,[sum(x*y for x,y in zip(A_r,[B_r[k] for B_r in B])) for k in range(1)])))


Fixed code:
n,m,l = map(int,input().split())
A=[]
B=[]
for i in range(n): 
    A.append(list(map(int,input().split())))
for j in range(m): 
    B.append(list(map(int,input().split())))
for A_r in A:
    print(" ".join(map(str,[sum([x*y for x,y in zip(A_r,[B_r[k] for B_r in B])]) for k in range(l)])))
Buggy code:
n,m,l = [int(i) for i in input().split()]
a = [int(i) for i in input().split()] for j in range(n)]
b = [int(i) for i in input().split()] for j in range(m)]
c = [[0 for i in range(n)] for j in range(l)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            c[i][j] += a[i][k] * b[k][j]
for i in range(l):
    print(' '.join(map(str,c[i])))

Fixed code:
n, m, l = [int(i) for i in input().split()]
a = [[int(i) for i in input().split()] for j in range(n)]
b = [[int(i) for i in input().split()] for j in range(m)]
ans = [[0]*l for i in range(n)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            ans[i][j] += a[i][k]*b[k][j]
print("\n".join(" ".join(map(str, i)) for i in ans))
Buggy code:
n, m, l = 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)]
C = [[0 for i in range(n)] for j in range(l)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            print(A[i][k], B[k][j])
            C[i][j] += A[i][k]*B[k][j]
for i in range(n):
    print(" ".join(map(str, C[i])))

Fixed code:
n, m, l = map(int, input().split())
A = []
for i in range(0, n):
    A.append(list(map(int, input().split())))

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

C = []
for i in range(0, n):
    row = []
    for j in range(0, l):
        sum = 0
        for k in range(0, m):
            sum += A[i][k] * B[k][j]
        row.append(sum)
    C.append(row)

for i in range(0, n):
    print(" ".join(map(str, C[i])))