qyliang/CodeNanoFix huggingface dataset:
Buggy code:
# B
import sys
a_list = []
a = []
f = True
c = [False for i in range(9)]
for i in range(3):
    a_list = list(map(int, input().split()))
    for num in a_list:
        a.append(num)
n = int(input())
for i in range(n):
    num = int(input())
    if num in a:
        index = a.index(num)
        c[index] = True
        if (c[0] and c[3] and c[6]) or (c[1] and c[4] and c[7]) or (c[2] and c[5] and c[8]) or (c[0] and c[1] and c[2]) or (c[3] and c[4] and c[5]) or (c[6] and c[7] and c[8]) or (c[0] and c[4] and c[8]) or (c[2] and c[4] and c[6]):
            print('Yes')
            f = False
if f:
    print('No')

Fixed code:
# B
import sys
a_list = []
a = []
c = [False for i in range(9)]
for i in range(3):
    a_list = list(map(int, input().split()))
    for num in a_list:
        a.append(num)
n = int(input())
for i in range(n):
    num = int(input())
    if num in a:
        index = a.index(num)
        c[index] = True

if (c[0] and c[3] and c[6]) or (c[1] and c[4] and c[7]) or (c[2] and c[5] and c[8]) or (c[0] and c[1] and c[2]) or (c[3] and c[4] and c[5]) or (c[6] and c[7] and c[8]) or (c[0] and c[4] and c[8]) or (c[2] and c[4] and c[6]):
    print('Yes')
else:
    print('No')
Buggy code:
A1 = list(map(int,input().rstrip().split()))
A2 = list(map(int,input().rstrip().split()))
A3 = list(map(int,input().rstrip().split()))

a = []
a.append(A1)
a.append(A2)
a.append(A3)

N = int(input().rstrip())
b = []
for i in range(N):
  b.append(int(input().rstrip()))

out = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
for t in b:
  for m in range(3):
    for n in range(3):
      if a[m][n] == t :
        out[m][n] = 1

if out[0][0]==out[1][1]==out[2][2] or \
out[0][0]==out[1][0]==out[2][0] or \
out[0][2]==out[1][1]==out[2][0] or \
out[0][1]==out[1][1]==out[2][1] or \
out[0][2]==out[1][2]==out[2][2] or \
out[0][0]==out[0][1]==out[0][2] or \
out[1][0]==out[1][1]==out[1][2] or \
out[2][0]==out[2][1]==out[2][2]:
  print('Yes')
else:
  print('No')

Fixed code:
A1 = list(map(int,input().rstrip().split()))
A2 = list(map(int,input().rstrip().split()))
A3 = list(map(int,input().rstrip().split()))

a = []
a.append(A1)
a.append(A2)
a.append(A3)

N = int(input().rstrip())
b = []
for i in range(N):
  b.append(int(input().rstrip()))

out = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
for t in b:
  for m in range(3):
    for n in range(3):
      if a[m][n] == t :
        out[m][n] = 1

if (out[0][0]==out[1][1]==out[2][2] and out[0][0]== 1 )or \
(out[0][0]==out[1][0]==out[2][0] and out[0][0]== 1 ) or \
(out[0][2]==out[1][1]==out[2][0] and out[0][2]== 1 ) or \
(out[0][1]==out[1][1]==out[2][1] and out[0][1]== 1 ) or \
(out[0][2]==out[1][2]==out[2][2] and out[0][2]== 1 ) or \
(out[0][0]==out[0][1]==out[0][2] and out[0][0]== 1 ) or \
(out[1][0]==out[1][1]==out[1][2] and out[1][0]== 1 ) or \
(out[2][0]==out[2][1]==out[2][2] and out[2][0]== 1 ):
  print('Yes')
else:
  print('No')
Buggy code:
arr = []
for i in range(3):
	te = list(map(int,input().split()))
	arr.append(te)
n = int(input())
check = []
for i in range(n):
	x = int(input())
	for j in range(3):
		for k in range(3):
			if arr[j][k]==x:
				arr[j][k] = 0
yes = False
for j in range(3):
	c = 0
	for k in range(3):
		if arr[j][k]==0:
			c+=1
	if c==3:
		yes = True
		break
	
if yes==False:
	for j in range(3):
		c = 0
		for k in range(3):
			if arr[k][j]==0:
				c+=1
		if c==3:
			yes = True
			break
if yes==False:
	c = 0
	for j in range(3):		
		if arr[j][j]==0:
			c+=1
	if c==3:
		yes = True
if yes==False:
	c = 0
	for j in range(3):		
		if arr[j][2-j]==0:
			c+=1
	if c==3:
		yes = True
if yes:
	print("YES")
else:
	print("NO")					

Fixed code:
arr = []
for i in range(3):
	te = list(map(int,input().split()))
	arr.append(te)
n = int(input())
check = []
for i in range(n):
	x = int(input())
	for j in range(3):
		for k in range(3):
			if arr[j][k]==x:
				arr[j][k] = 0
yes = False
for j in range(3):
	c = 0
	for k in range(3):
		if arr[j][k]==0:
			c+=1
	if c==3:
		yes = True
		break
	
if yes==False:
	for j in range(3):
		c = 0
		for k in range(3):
			if arr[k][j]==0:
				c+=1
		if c==3:
			yes = True
			break
if yes==False:
	c = 0
	for j in range(3):		
		if arr[j][j]==0:
			c+=1
	if c==3:
		yes = True
if yes==False:
	c = 0
	for j in range(3):		
		if arr[j][2-j]==0:
			c+=1
	if c==3:
		yes = True
if yes:
	print("Yes")
else:
	print("No")
Buggy code:

data = []
for j in range(3):
  data.extend([int (i) for i in input().split()])

bingo_dic = {}
for i, d in enumerate(data):
  bingo_dic[d] = i
  
N = int(input())

bingo = [0,0,0,0,0,0,0,0,0]
for _ in range(N):
  i = int(input())
  if i in bingo_dic.keys():
    bingo[bingo_dic[i]] = 1
    
if bingo[0] + bingo[1] + bingo[2] == 3:
  print('yes')
  exit()
  
if bingo[3] + bingo[4] + bingo[5] == 3:
  print('yes')
  exit()
  
if bingo[6] + bingo[7] + bingo[8] == 3:
  print('yes')
  exit()
  
if bingo[0] + bingo[3] + bingo[6] == 3:
  print('yes')
  exit()

if bingo[1] + bingo[4] + bingo[7] == 3:
  print('yes')
  exit()
  
if bingo[2] + bingo[5] + bingo[8] == 3:
  print('yes')
  exit()
  
if bingo[0] + bingo[4] + bingo[8] == 3:
  print('yes')
  exit()

if bingo[2] + bingo[4] + bingo[6] == 3:
  print('yes')
  exit()

print('no')

Fixed code:
data = []
for j in range(3):
  data.extend([int (i) for i in input().split()])

bingo_dic = {}
for i, d in enumerate(data):
  bingo_dic[d] = i
  
N = int(input())

bingo = [0,0,0,0,0,0,0,0,0]
for _ in range(N):
  i = int(input())
  if i in bingo_dic.keys():
    bingo[bingo_dic[i]] = 1
    
if bingo[0] + bingo[1] + bingo[2] == 3:
  print('Yes')
  exit()
  
if bingo[3] + bingo[4] + bingo[5] == 3:
  print('Yes')
  exit()
  
if bingo[6] + bingo[7] + bingo[8] == 3:
  print('Yes')
  exit()
  
if bingo[0] + bingo[3] + bingo[6] == 3:
  print('Yes')
  exit()

if bingo[1] + bingo[4] + bingo[7] == 3:
  print('Yes')
  exit()
  
if bingo[2] + bingo[5] + bingo[8] == 3:
  print('Yes')
  exit()
  
if bingo[0] + bingo[4] + bingo[8] == 3:
  print('Yes')
  exit()

if bingo[2] + bingo[4] + bingo[6] == 3:
  print('Yes')
  exit()

print('No')
Buggy code:
A = [list(map(int, input().split())) for _ in range(3)]
N = int(input())


for _ in range(N):
    B = int(input())
    for i in range(3):
      for j in range(3):
          if A[i][j] == B:
              A[i][j] == 0
        
bingo = False
for row in A:
  if sum(row) == 0:
    bingo = True
for col in zip(*A):
  if sum(col) == 0:
    bingo= True
if sum(A[i][i] for i in range(3) )== 0:
  bingo =True
if sum(A[i][3 - i - 1] for i in range(3)) == 0:
  bingo = True
  
print("Yes" if bingo == True else "No")

Fixed code:
A = [list(map(int, input().split())) for _ in range(3)]
N = int(input())

for _ in range(N):
    B = int(input())
    for i in range(3):
        for j in range(3):
            if A[i][j] == B:
               A[i][j] = 0
ans = False     
for row in A:
    if sum(row) == 0:
        ans = True
for col in zip(*A):
    if sum(col) == 0:
        ans = True

if sum(A[i][i] for i in range(3)) == 0:
    ans =True
if sum(A[i][3 - i - 1] for i in range(3)) == 0:
    ans =True

print("Yes" if ans == True else "No" )
Buggy code:
card = [0]*3
for i in range(3):
    a = input().split()
    card[i] = [int(s) for s in a]
for i in range(int(input())):
    b = int(input())
    for j in range(3):
        for k in range(3):
            if b == card[j][k]:
                card[j][k] = 0
if (card[0][0] == 0 and card[1][0] == 0 and card[2][0] == 0) or (card[0][1] == 0 and card[1][1] == 0 and card[2][1] == 0) or (card[0][2] == 0 and card[1][2] == 0 and card[2][2] == 0) or(card[0][0] == 0 and card[0][1] == 0 and card[0][2] == 0) or (card[1][0] == 0 and card[1][1] == 0 and card[1][2] == 0) or (card[2][0] == 0 and card[2][1] == 0 and card[2][2] == 0) or (card[0][0] == 0 and card[1][1] == 0 and card[2][2] == 0) or (card[0][2] == 0 and card[1][1] == 0 and card[2][0] == 0):
    print("Yes")
else:
    ("No")

Fixed code:
card = [0]*3
for i in range(3):
    a = input().split()
    card[i] = [int(s) for s in a]
for i in range(int(input())):
    b = int(input())
    for j in range(3):
        for k in range(3):
            if b == card[j][k]:
                card[j][k] = 0
if (card[0][0] == 0 and card[1][0] == 0 and card[2][0] == 0) or (card[0][1] == 0 and card[1][1] == 0 and card[2][1] == 0) or (card[0][2] == 0 and card[1][2] == 0 and card[2][2] == 0) or(card[0][0] == 0 and card[0][1] == 0 and card[0][2] == 0) or (card[1][0] == 0 and card[1][1] == 0 and card[1][2] == 0) or (card[2][0] == 0 and card[2][1] == 0 and card[2][2] == 0) or (card[0][0] == 0 and card[1][1] == 0 and card[2][2] == 0) or (card[0][2] == 0 and card[1][1] == 0 and card[2][0] == 0):
    print("Yes")
else:
    print("No")
Buggy code:
a_1=list(map(int, input().split()))
a_2=list(map(int, input().split()))
a_3=list(map(int, input().split()))

c=[a_1,a_2,a_3]

N=int(input())

b=[int(input()) for _ in range(N)]

for i in range(3):
    for j in range(3):
        if a[i][j] in b:
            a[i][j]=0
            
            
i=0
if a[0][0]==0 and a[0][1]==0 and a[0][2]:
    i+=1
if a[1][0]==0 and a[1][1]==0 and a[1][2]:
    i+=1
if a[2][0]==0 and a[2][1]==0 and a[2][2]:
    i+=1
if a[0][0]==0 and a[1][0]==0 and a[2][0]:
    i+=1
if a[0][1]==0 and a[1][1]==0 and a[2][1]:
    i+=1
if a[0][2]==0 and a[1][2]==0 and a[2][2]:
    i+=1
if a[0][0]==0 and a[1][1]==0 and a[2][2]:
    i+=1
if a[0][2]==0 and a[1][1]==0 and a[2][0]:
    i+=1
    
if i>0:
    print("Yes")
elif i==0:
    print("No")

Fixed code:
a_1=list(map(int, input().split()))
a_2=list(map(int, input().split()))
a_3=list(map(int, input().split()))

c=[a_1,a_2,a_3]

N=int(input())

b=[int(input()) for _ in range(N)]

for i in range(3):
    for j in range(3):
        if c[i][j] in b:
            c[i][j]=0
            
            
i=0
if c[0][0]==0 and c[0][1]==0 and c[0][2]==0:
    i+=1
if c[1][0]==0 and c[1][1]==0 and c[1][2]==0:
    i+=1
if c[2][0]==0 and c[2][1]==0 and c[2][2]==0:
    i+=1
if c[0][0]==0 and c[1][0]==0 and c[2][0]==0:
    i+=1
if c[0][1]==0 and c[1][1]==0 and c[2][1]==0:
    i+=1
if c[0][2]==0 and c[1][2]==0 and c[2][2]==0:
    i+=1
if c[0][0]==0 and c[1][1]==0 and c[2][2]==0:
    i+=1
if c[0][2]==0 and c[1][1]==0 and c[2][0]==0:
    i+=1
    
if i>0:
    print("Yes")
else:
  print("No")
Buggy code:
import numpy as np
N_1=list(map(int, input().split()))
N_2=list(map(int, input().split()))
N_3=list(map(int, input().split()))
N=int(input())
a=[int(input()) for i in range(N)]

n=np.array([N_1,N_2,N_3])

for a_n in a:
    if a_n in n:
        n[n==a_n]=0
    else:
        pass

if np.all(n[0:,0])==0:
    i=+1
elif np.all(n[0:,1])==0:
    i+=1
elif np.all(n[0:,2])==0:
    i+=1
elif np.all(n[0,0:])==0:
    i+=1
elif np.all(n[1,0:])==0:
    i+=1                
elif np.all(n[2,0:])==0:
    i+=1                
elif n[0,0] and n[1,1] and n[2,2] ==0:
    i+=1                
elif n[0,2] and n[1,1] and n[2,0] ==0:
    i+=1

if i>0:
    print("Yes")
else:
    print("No")


Fixed code:
import numpy as np
N_1=list(map(int, input().split()))
N_2=list(map(int, input().split()))
N_3=list(map(int, input().split()))
N=int(input())
a=[int(input()) for i in range(N)]

n=np.array([N_1,N_2,N_3])

for a_n in a:
    if a_n in n:
        n[n==a_n]=0
    else:
        pass
i=0
    
if np.all(n[0:,0]==0)==True:
    i=+1
    
elif np.all(n[0:,1]==0)==True:
    i+=1
    
elif np.all(n[0:,2]==0)==True:
    i+=1
    
elif np.all(n[0,0:]==0)==True:
    i+=1
    
elif np.all(n[1,0:]==0)==True:
    i+=1

elif np.all(n[2,0:]==0)==True:
    i+=1

elif n[0,0]==0 and n[1,1]==0  and n[2,2] ==0:
    i+=1
    
elif n[0,2]==0 and n[1,1]==0 and n[2,0] ==0:
    i+=1
    
if i>0:
    print("Yes")
else:
    print("No")
Buggy code:
import sys

input = sys.stdin.readline

A = []
b = []
B = [[0, 0, 0] for _ in range(3)]

for _ in range(3):
    A.append(list(map(int, input().split())))

N = int(input())

for _ in range(N):
    b.append(int(input()))

for value in b:
    for i in range(3):
        for j in range(3):
            if A[i][j] == value:
                B[i][j] = 1

bingo = False

if B[0][0] == 1:
    if B[0][1] == 1 and B[0][1] == 1:
        bingo = True
    if B[1][0] == 1 and B[2][0] == 1:
        bingo = True
    if B[1][1] == 1 and B[2][2] == 1:
        bingo = True

if B[1][1] == 1:
    if B[1][0] == 1 and B[1][2] == 1:
        bingo = True
    if B[0][1] == 1 and B[2][1] == 1:
        bingo = True
    if B[0][2] == 1 and B[2][0] == 1:
        bingo = True   

if B[2][2] == 1:
    if B[0][2] == 1 and B[1][2] == 1:
        bingo = True
    if B[2][0] == 1 and B[2][1] == 1:
        bingo = True
    
if bingo:
    print('Yes')
else:
    print('No')

print(B)

Fixed code:
import sys

input = sys.stdin.readline

A = []
b = []
B = [[0, 0, 0] for _ in range(3)]

for _ in range(3):
    A.append(list(map(int, input().split())))

N = int(input())

for _ in range(N):
    b.append(int(input()))

for value in b:
    for i in range(3):
        for j in range(3):
            if A[i][j] == value:
                B[i][j] = 1

bingo = False

if B[0][0] == 1:
    if B[0][1] == 1 and B[0][2] == 1:
        bingo = True
    if B[1][0] == 1 and B[2][0] == 1:
        bingo = True
    if B[1][1] == 1 and B[2][2] == 1:
        bingo = True

if B[1][1] == 1:
    if B[1][0] == 1 and B[1][2] == 1:
        bingo = True
    if B[0][1] == 1 and B[2][1] == 1:
        bingo = True
    if B[0][2] == 1 and B[2][0] == 1:
        bingo = True   

if B[2][2] == 1:
    if B[0][2] == 1 and B[1][2] == 1:
        bingo = True
    if B[2][0] == 1 and B[2][1] == 1:
        bingo = True
    
if bingo:
    print('Yes')
else:
    print('No')
Buggy code:
A = [[int(i) for i in input().split()] for _ in range(3)]
B = [[False, False, False], [False, False, False], [False, False, False]]
N = int(input())
for i in range(N):
    b = int(input())
    for j in range(3):
        for k in range(3):
            if A[j][k]==b:
                B[j][k]=True
for r in B:
    if all(r):
        print("Yes")
        quit()

for c in zip(*A):
    if all(c):
        print("Yes")
        quit()
# print(B)
if (B[0][0] and B[1][1] and B[2][2]) or (B[0][2] and B[1][1] and B[2][0]):
    print("Yes")
    quit()

print("No")

Fixed code:
A = [[int(i) for i in input().split()] for _ in range(3)]
B = [[False, False, False], [False, False, False], [False, False, False]]
N = int(input())
for i in range(N):
    b = int(input())
    for j in range(3):
        for k in range(3):
            if A[j][k]==b:
                B[j][k]=True
for r in B:
    if all(r):
        print("Yes")
        quit()

for c in zip(*B):
    if all(c):
        print("Yes")
        quit()
# print(B)
if (B[0][0] and B[1][1] and B[2][2]) or (B[0][2] and B[1][1] and B[2][0]):
    print("Yes")
    quit()

print("No")
Buggy code:
t = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
m = [int(input()) for i in range(n)]
for i in range(3):
        if t[i][0] in m and t[i][1] in m and t[i][2] in m:
            print('Yes')
            break
        elif t[0][i] in m and t[1][i] in m and t[2][i] in m:
            print('Yes')
            break
        elif t[0][0] in m and t[1][1] in m and t[2][2] in m:
            print('Yes')
            break
        elif t[0][2] in m and t[1][1] in m and t[2][0] in m:
            print('Yes')
            break
        else:
            print('No')

Fixed code:
t = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
m = [int(input()) for i in range(n)]
x = 0
for i in range(3):
        if t[i][0] in m and t[i][1] in m and t[i][2] in m:
            print('Yes')
            break
        elif t[0][i] in m and t[1][i] in m and t[2][i] in m:
            print('Yes')
            break
        elif t[0][0] in m and t[1][1] in m and t[2][2] in m:
            print('Yes')
            break
        elif t[0][2] in m and t[1][1] in m and t[2][0] in m:
            print('Yes')
            break
        else:
            x += 1
if x == 3:
    print('No')
Buggy code:
a = []
for i in range(3):
  d, b, c = map(int, input().split())
  a.append(d)
  a.append(b)
  a.append(c)
for _ in range(int(input())):
  n = int(input())
  if(n in a):
    a[a.index(n)] = 0
retsu = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]]
frag = False
for i in range(8):
  frag1 = True
  for s in retsu[i]:
    if(a[s] > 0):
      frag1 = False
if(frag):
  print("Yes")
else:
  print("No")

Fixed code:
a = []
for i in range(3):
  d, b, c = map(int, input().split())
  a.append(d)
  a.append(b)
  a.append(c)
for _ in range(int(input())):
  n = int(input())
  if(n in a):
    a[a.index(n)] = 0
retsu = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]]
frag = False
for i in range(8):
  frag1 = True
  for s in range(3):
    if(a[retsu[i][s]] > 0):
      frag1 = False
  frag = frag1 or frag
if(frag):
  print("Yes")
else:
  print("No")
Buggy code:
A=[]
for i in range(3):
    A.append(list(map(int,input().split())))
print(A)
N=int(input())
b=[0 for i in range(N)]
for i in range(N):
    b[i]=int(input())
print(b)

for i in range(3):
    if(A[i][0] in b and A[i][1] in b and A[i][2] in b):
        print('Yes')
        exit()
    if(A[0][i] in b and A[1][i] in b and A[2][i] in b):
        print('Yes')
        exit()
if(A[0][0] in b and A[1][1] in b and A[2][2] in b):
    print('Yes')
    exit()
if(A[0][2] in b and A[1][1] in b and A[2][0] in b):
    print('Yes')
    exit()

print('No')


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

N=int(input())
b=[0 for i in range(N)]
for i in range(N):
    b[i]=int(input())


for i in range(3):
    if(A[i][0] in b and A[i][1] in b and A[i][2] in b):
        print('Yes')
        exit()
    if(A[0][i] in b and A[1][i] in b and A[2][i] in b):
        print('Yes')
        exit()
if(A[0][0] in b and A[1][1] in b and A[2][2] in b):
    print('Yes')
    exit()
if(A[0][2] in b and A[1][1] in b and A[2][0] in b):
    print('Yes')
    exit()

print('No')
Buggy code:
import sys
import math
from io import StringIO


lines = [[0,1,2], [3,4,5], [6,7,8],[0,3,6],[1,4,7],[2,4,8],[0,4,8],[2,4,6]]

table = [int(s) for s in input().split()]
table += [int(s) for s in input().split()]
table += [int(s) for s in input().split()]

lis = [int(input()) for _ in range(int(input()))]

ans = [ n in lis for n in table ]

for line in lines:
  valid = True
  for num in line:
    if not ans[num] :
      valid = False
      break

      if valid:
        print('Yes')
        return

      print('No')


Fixed code:
import sys
import math
from io import StringIO
import unittest

lines = [[0,1,2], [3,4,5], [6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]

def resolve():
    table = [int(s) for s in input().split()]
    table += [int(s) for s in input().split()]
    table += [int(s) for s in input().split()]

    lis = [int(input()) for _ in range(int(input()))]

    ans = [ n in lis for n in table ]

    for line in lines:
        valid = True
        for num in line:
            if not ans[num] :
                valid = False
                break

        if valid:
            print('Yes')
            return

    print('No')
resolve()
Buggy code:
A = []
for i in range(3):
    array = list(map(int, input().strip().split()))
    A.append(array)

# A = [input().split() for l in range(3)] 

N = int(input())
b = []
flag = 0
for i in range(N):
    b.append(int(input()))

print(type(int(A[0][0])))
print(type(b[0]))

if A[0][0] == b[0]:
    print("Yes")

for i in range(3):
    for j in range(3):
        for k in range(N):
            #print(A[i][j], b[k])
            if A[i][j] == b[k]:
                A[i][j] = 1000

for i in range(3):
    if A[i][0] == A[i][1] and A[i][1] == A[i][2] and A[i][2] == 1000:
        flag = 1
    if A[0][i] == A[1][i] and A[1][i] == A[2][i] and A[2][i] == 1000:
        flag = 1
    if A[0][0] == A[1][1] and A[1][1] == A[2][2] and A[2][2] == 1000:
        flag = 1
    if A[0][2] == A[1][1] and A[1][1] == A[2][0] and A[2][0] == 1000:
        flag = 1

if flag == 1:
    print("Yes")
else:
    print("No")
print(A)

Fixed code:
A = []
for i in range(3):
    array = list(map(int, input().strip().split()))
    A.append(array)

# A = [input().split() for l in range(3)] 

N = int(input())
b = []
flag = 0
for i in range(N):
    b.append(int(input()))

#print(type(int(A[0][0])))
#print(type(b[0]))

for i in range(3):
    for j in range(3):
        for k in range(N):
            #print(A[i][j], b[k])
            if A[i][j] == b[k]:
                A[i][j] = 1000

for i in range(3):
    if A[i][0] == A[i][1] and A[i][1] == A[i][2] and A[i][2] == 1000:
        flag = 1
    if A[0][i] == A[1][i] and A[1][i] == A[2][i] and A[2][i] == 1000:
        flag = 1
    if A[0][0] == A[1][1] and A[1][1] == A[2][2] and A[2][2] == 1000:
        flag = 1
    if A[0][2] == A[1][1] and A[1][1] == A[2][0] and A[2][0] == 1000:
        flag = 1

if flag == 1:
    print("Yes")
else:
    print("No")
Buggy code:
x = [input().split() for i in range(3)]
N = int(input())
b = [int(input()) for n in range(N)]
l = [[0]*3, [0]*3, [0]*3]
for val in b:
    for i in range(3):
        for j in range(3):
            print(val)
            if val == int(x[i][j]):
                l[i][j] = 1
if l[0][0] + l[0][1] + l[0][2] == 3:
    print('Yes')
elif l[1][0] + l[1][1] + l[1][2] == 3:
    print('Yes')
elif l[2][0] + l[2][1] + l[2][2] == 3:
    pritn('Yes')
elif l[0][0] + l[1][0] + l[2][0] == 3:
    print('Yes')
elif l[0][1] + l[1][1] + l[2][1] == 3:
    print('Yes')
elif l[0][2] + l[1][2] + l[2][2] == 3:
    print('Yes')
elif l[0][0] + l[1][1] + l[2][2] == 3:
    print('Yes')
elif l[0][2] + l[1][1] + l[2][0] == 3:
    print('Yes')
else:
    print('No')

Fixed code:
x = [input().split() for i in range(3)]
N = int(input())
b = [int(input()) for n in range(N)]
l = [[0]*3, [0]*3, [0]*3]
for val in b:
    for i in range(3):
        for j in range(3):
            if val == int(x[i][j]):
                l[i][j] = 1
if l[0][0] + l[0][1] + l[0][2] == 3:
    print('Yes')
elif l[1][0] + l[1][1] + l[1][2] == 3:
    print('Yes')
elif l[2][0] + l[2][1] + l[2][2] == 3:
    print('Yes')
elif l[0][0] + l[1][0] + l[2][0] == 3:
    print('Yes')
elif l[0][1] + l[1][1] + l[2][1] == 3:
    print('Yes')
elif l[0][2] + l[1][2] + l[2][2] == 3:
    print('Yes')
elif l[0][0] + l[1][1] + l[2][2] == 3:
    print('Yes')
elif l[0][2] + l[1][1] + l[2][0] == 3:
    print('Yes')
else:
    print('No')
Buggy code:
a = [list(map(int,input().split())) for _ in range(3)]
n = int(input())
b = [int(input()) for _ in range(n)]
ati = [[a[0][i],a[1][i],a[2][i]] for i in range(3)]
an1 = [a[0][0],a[1][1],a[2][2]]
an2 = [a[0][2],a[1][1],a[2][0]]
for i in a:
  all(j in b for j in i)
  print('Yes')
  exit()
for i in ati:
  all(j in b for j in i)
  print('Yes')
  exit()
for i in an1:
  all(j in b for j in i)
  print('Yes')
  exit()
for i in an2:
  all(j in b for j in i)
  print('Yes')
  exit()
print('No')

Fixed code:
a = [list(map(int,input().split())) for _ in range(3)]
n = int(input())
b = [int(input()) for _ in range(n)]
ati=[[a[0][i],a[1][i],a[2][i]] for i in range(3)]
an1 = [a[0][0],a[1][1],a[2][2]]
an2 = [a[2][0],a[1][1],a[0][2]]
for i in a:
  if all(j in b for j in i):
    print('Yes')
    exit()
for i in ati:
  if all(j in b for j in i):
    print('Yes')
    exit()
for i in [an1,an2]:
  if all(j in b for j in i):
    print('Yes')
    exit()
print('No')