qyliang/CodeNanoFix huggingface dataset:
Buggy code:
def resolve():
    a = list(map(int, input().split()))
    a.extend(list(map(int, input().split())))
    a.extend(list(map(int, input().split())))
    n = int(input())
    for i in range(n):
        b = int(input())
        for j in range(len(a)):
            if a[j] == b:
                a[j] = -1
    x1 = a[0:3].count(-1)
    x2 = a[3:6].count(-1)
    x3 = a[6:9].count(-1)
    y1 = a[0:7:3].count(-1)
    y2 = a[1:8:3].count(-1)
    y3 = a[2:9:3].count(-1)
    nn = a[0:9:4].count(-1)

    if x1 == 3 or x2 == 3 or x3 == 3 or y1 == 3 or y2 == 3 or y3 == 3 or nn == 3:
        print('Yes')
    else:
        print('No')

Fixed code:
def resolve():
    a = list(map(int, input().split()))
    a.extend(list(map(int, input().split())))
    a.extend(list(map(int, input().split())))
    n = int(input())
    for i in range(n):
        b = int(input())
        for j in range(len(a)):
            if a[j] == b:
                a[j] = -1
    x1 = a[0:3].count(-1)
    x2 = a[3:6].count(-1)
    x3 = a[6:9].count(-1)
    y1 = a[0:7:3].count(-1)
    y2 = a[1:8:3].count(-1)
    y3 = a[2:9:3].count(-1)
    nn = a[0:9:4].count(-1)
    nn2 = a[2:7:2].count(-1)

    if x1 == 3 or x2 == 3 or x3 == 3 or y1 == 3 or y2 == 3 or y3 == 3 or nn == 3 or nn2 == 3:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    resolve()
Buggy code:
import numpy as np

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

N = int(input().split())
s = [int(input()) for i in range(N)]

for i in s:
    b = np.where(grid==i,0,grid)
    
if grid[0][0]==0 & grid[0][1]==0 & grid[0][2]==0:
    han = "Yes"
elif grid[1][0]==0 & grid[1][1]==0 & grid[1][2]==0:
    han = "Yes"
elif grid[2][0]==0 & grid[2][1]==0 & grid[2][2]==0:
    han = "Yes"
elif grid[0][0]==0 & grid[1][0]==0 & grid[2][0]==0:
    han = "Yes"
elif grid[0][1]==0 & grid[1][1]==0 & grid[2][1]==0:
    han = "Yes"
elif grid[0][2]==0 & grid[1][2]==0 & grid[2][2]==0:
    han = "Yes"
elif grid[0][0]==0 & grid[1][1]==0 & grid[2][2]==0:
    han = "Yes"
elif grid[0][2]==0 & grid[1][1]==0 & grid[2][0]==0:
    han = "Yes"
else:
    han = "No"
print(han)


Fixed code:
import numpy as np

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

N = int(input())
s = [int(input()) for i in range(N)]

for i in s:
    grid = np.where(grid==i,0,grid)
    
#print(grid)
    
if grid[0][0]==0 and grid[0][1]==0 and grid[0][2]==0:
    han = "Yes"
elif grid[1][0]==0 and grid[1][1]==0 and grid[1][2]==0:
    han = "Yes"
elif grid[2][0]==0 and grid[2][1]==0 and grid[2][2]==0:
    han = "Yes"
elif grid[0][0]==0 and grid[1][0]==0 and grid[2][0]==0:
    han = "Yes"
elif grid[0][1]==0 and grid[1][1]==0 and grid[2][1]==0:
    han = "Yes"
elif grid[0][2]==0 and grid[1][2]==0 and grid[2][2]==0:
    han = "Yes"
elif grid[0][0]==0 and grid[1][1]==0 and grid[2][2]==0:
    han = "Yes"
elif grid[0][2]==0 and grid[1][1]==0 and grid[2][0]==0:
    han = "Yes"
else:
    han = "No"
print(han)
Buggy code:
a = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
b = [int(input()) for _ in range(n)]
a_hash = [[False, False, False] for _ in range(3)]

for i in b:
    for ind, j in enumerate(a):
        if i in j:
            a_hash[ind][j.index(i)] = True

for i in a_hash:
    if all(i):
        print("Yes")
        exit()
for num in range(3):
    if a_hash[num][0] and a_hash[num][1] and a_hash[num][2]:
        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)]
a_hash = [[False, False, False] for _ in range(3)]

for i in b:
    for ind, j in enumerate(a):
        if i in j:
            a_hash[ind][j.index(i)] = True

for i in a_hash:
    if all(i):
        print("Yes")
        exit()

if a_hash[0][0] and a_hash[1][1] and a_hash[2][2]:
    print("Yes")
    exit()
elif a_hash[0][2] and a_hash[1][1] and a_hash[2][0]:
    print("Yes")
    exit()

for num in range(3):
    if a_hash[0][num] and a_hash[1][num] and a_hash[2][num]:
        print("Yes")
        exit()
print("No")
Buggy code:
a = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
b = [int(input()) for _ in range(n)]

for i in range(3):
    for j in range(3):
        for k in range(n):
            if a[i][j] == b[k]:
                a[i][j] = 0

ans = "No"
for i in range(3):
    if a[i][0] + a[i][1] + a[i][2] == 0:
        ans = "Yes"
    if a[0][i] + a[1][i] + a[2][i] == 0:
        ans = "Yes"
if a[0][0] == a[1][1] == a[2][2] == 0 or a[0][2] == a[1][1] == a[2][0] == 0:
    print("Yes")
print(ans)

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

for i in range(3):
    for j in range(3):
        for k in range(n):
            if a[i][j] == b[k]:
                a[i][j] = 0

ans = "No"
for i in range(3):
    if a[i][0] + a[i][1] + a[i][2] == 0:
        print("Yes")
        exit()

    if a[0][i] + a[1][i] + a[2][i] == 0:
        print("Yes")
        exit()

if a[0][0] + a[1][1] + a[2][2] == 0:
    print("Yes")
    exit()
if a[2][0] + a[1][1] + a[0][2] == 0:
    print("Yes")
    exit()

print(ans)
Buggy code:
import sys
A1 = list(map(int, sys.stdin.readline().split()))
A2 = list(map(int, sys.stdin.readline().split()))
A3 = list(map(int, sys.stdin.readline().split()))
N = int(sys.stdin.readline())
b = [int(sys.stdin.readline()) for _ in range(N)]
A = A1 + A2 + A3
i = 0
while i <= 8:
  if b.count(A[i]):
    A[i] = 101
  i += 1
bingoFlag = False
k = 0
while k <= 2:
  if A[k] == A[k+3] == A[k+6]:
    bingoFlag = True
    break
  k += 1
if A[0] == A[4] == A[8] or A[2] == A[4] == A[6]:
  bingoFlag = True
if bingFlag:
  print("Yes")
else:
  print("No")


Fixed code:
import sys
A1 = list(map(int, sys.stdin.readline().split()))
A2 = list(map(int, sys.stdin.readline().split()))
A3 = list(map(int, sys.stdin.readline().split()))
N = int(sys.stdin.readline())
b = [int(sys.stdin.readline()) for _ in range(N)]
A = A1 + A2 + A3
i = 0
while i <= 8:
  if b.count(A[i]):
    A[i] = 101
  i += 1
bingoFlag = False
k = 0
while k <= 2:
  if A[k] == A[k+3] == A[k+6] or A[k*3] == A[k*3 + 1] == A[k*3 + 2]:
    bingoFlag = True
    break
  k += 1
if A[0] == A[4] == A[8] or A[2] == A[4] == A[6]:
  bingoFlag = True
if bingoFlag:
  print("Yes")
else:
  print("No")
Buggy code:
A = []
for _ in range(3):
    a = [int(a) for a in input().split()]
    A.append(a)
N = int(input())
for _ in range(N):
    num = int(input())
    for i in range(3):
        for j in range(3):
            if A[i][j]==num:
                A[i][j] = -1

# Rows
for row in range(3):
    bingo_row = True
    for col in range(3):
        if A[row][col]!=-1:
            bingo_row = False
    if bingo_row:
        print('rows Yes')
        exit()
    
# Columns
for col in range(3):
    bingo_col = True
    for row in range(3):
        if A[row][col]!=-1:
            bingo_col = False
    if bingo_col:
        print('cols Yes')
        exit()

# Naname
bingo_naname = True
for i in range(3):
    col, row = i, i
    if A[row][col] != -1:
        bingo_naname = False
if bingo_naname:
    print('naname1 Yes')
    exit()
bingo_naname = True
for i in range(3):
    col, row = 2-i, i
    if A[row][col] != -1:
        bingo_naname = False
if bingo_naname:
    print('naname2 Yes')
    exit()

print('No')


Fixed code:
A = []
for _ in range(3):
    a = [int(a) for a in input().split()]
    A.append(a)
N = int(input())
for _ in range(N):
    num = int(input())
    for i in range(3):
        for j in range(3):
            if A[i][j]==num:
                A[i][j] = -1

# Rows
for row in range(3):
    bingo_row = True
    for col in range(3):
        if A[row][col]!=-1:
            bingo_row = False
    if bingo_row:
        print('Yes')
        exit()
    
# Columns
for col in range(3):
    bingo_col = True
    for row in range(3):
        if A[row][col]!=-1:
            bingo_col = False
    if bingo_col:
        print('Yes')
        exit()

# Naname
bingo_naname = True
for i in range(3):
    col, row = i, i
    if A[row][col] != -1:
        bingo_naname = False
if bingo_naname:
    print('Yes')
    exit()
bingo_naname = True
for i in range(3):
    col, row = 2-i, i
    if A[row][col] != -1:
        bingo_naname = False
if bingo_naname:
    print('Yes')
    exit()

print('No')
Buggy code:
import sys
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
N = int(input())
M = [int(input()) for i in range(N)]

for m in range(M):
  if M[m] in A:
    A[M[m]] = 0
  elif M[m] in B:
    B[M[m]] = 0
  elif M[m] in C:
    C[M[m]] = 0

for t in range(3):
  if A[t] + B[t] + C[t] ==0:
    print("Yes")
    sys.exit()
if sum(A) == 0 or sum(B) == 0 or sum(c) ==0:
  print("Yes")
  sys.exit()
elif A[0] + B[1] + C[2] == 0:
  print("Yes")
  sys.exit()
elif A[2] + B[1] +C[0] == 0:
  print("Yes")
else:
  print("No")

Fixed code:
import sys
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
N = int(input())
M = [int(input()) for i in range(N)]
for m in range(len(M)):
	if M[m] in A:
		A[A.index(M[m])] = 0
	elif M[m] in B:
		B[B.index(M[m])] = 0
	elif M[m] in C:
		C[C.index(M[m])] = 0
for t in range(3):
	if A[t] + B[t] + C[t] == 0:
		print('Yes')
		sys.exit()
if sum(A) == 0 or sum(B) == 0 or sum(C) ==0:
	print('Yes')
	sys.exit()
elif A[0] + B[1] + C[2] == 0:
	print('Yes')
	sys.exit()
elif A[2] + B[1] +C[0] == 0:
	print('Yes')
else:
	print('No')
Buggy code:
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
a3 = list(map(int, input().split()))

al = a1+a2+a3
n =int(input())

for i in range(n):
    b = int(input())
    if b == al:
        al[al.index()] = 0
if al[0] + al[1] + al[2] == 0 or al[3] + al[4] + al[5] == 0 or al[6] + al[7] + al[8] == 0 or al[0] + al[3] + al[6] == 0 or al[1] + al[4] + al[7] == 0 or al[2] + al[5] + al[8] == 0 or al[0] + al[4] + al[8] == 0 or al[2] + al[4] + al[6] == 0:
    print("Yes")
else:
    print("No")


Fixed code:
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
a3 = list(map(int, input().split()))

al = a1+a2+a3
n =int(input())

for i in range(n):
    b = int(input())
    if b in al:
        al[al.index(b)] = 0
if al[0] + al[1] + al[2] == 0 or al[3] + al[4] + al[5] == 0 or al[6] + al[7] + al[8] == 0 or al[0] + al[3] + al[6] == 0 or al[1] + al[4] + al[7] == 0 or al[2] + al[5] + al[8] == 0 or al[0] + al[4] + al[8] == 0 or al[2] + al[4] + al[6] == 0:
    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)]
maze=[["*" for i in range(3)] for _ in range(3)]
for i in range(3):
    for j in range(3):
        for k in range(n):
            if b[i]==a[j][k]:
                maze[j][k]="#"
for i in range(3):
    f=1
    for j in range(3):
        if maze[i][j]!="#":
            f=0
            break
    if f:
        print("Yes")
        exit()
for i in range(3):
    fc=1
    for j in range(3):
        if maze[j][i]!="#":
            fc=0
            break
    if fc:
        print("Yes")
        exit()
for i in range(3):
    fa=1
    if maze[i][i]!="#":
        fa=0
        break
if fa:
    print("Yes")
    exit()
for i in range(3):
    fe=1
    if maze[i][2-i]!="#":
        fe=0
        break
if fe:
    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)]
maze=[["*" for i in range(3)] for _ in range(3)]
for i in range(n):
    for j in range(3):
        for k in range(3):
            if b[i]==a[j][k]:
                maze[j][k]="#"
for i in range(3):
    f=1
    for j in range(3):
        if maze[i][j]!="#":
            f=0
            break
    if f:
        print("Yes")
        exit()
for i in range(3):
    fc=1
    for j in range(3):
        if maze[j][i]!="#":
            fc=0
            break
    if fc:
        print("Yes")
        exit()
for i in range(3):
    fa=1
    if maze[i][i]!="#":
        fa=0
        break
if fa:
    print("Yes")
    exit()
for i in range(3):
    fe=1
    if maze[i][2-i]!="#":
        fe=0
        break
if fe:
    print("Yes")
    exit()
print("No")
Buggy code:
def resolve():
    A = [list(map(int, input().split())) for _ in range(3)]
    N = int(input())
    B = [int(input()) for _ in range(N)]
    punch = [[False for _ in range(3)] for _ in range(3)]
    for i in range(3):
        for j in range(3):
            if A[i][j] in B:
                punch[i][j] = True
    print(punch, file=sys.stderr)
    ans = "No"
    for i in range(3):
        if False not in punch[i]:
            ans = "Yes"
            break
        for j in range(3):
            if not punch[j][i]:
                break
        else:
            ans = "Yes"
            break
    if (punch[0][0] and punch[1][1] and punch[2][2]) or (
            punch[0][2] and punch[1][1] and punch[2][0]):
        ans = "Yes"
    print(ans)


resolve()


Fixed code:
def resolve():
    A = [list(map(int, input().split())) for _ in range(3)]
    N = int(input())
    B = [int(input()) for _ in range(N)]
    punch = [[False for _ in range(3)] for _ in range(3)]
    for i in range(3):
        for j in range(3):
            if A[i][j] in B:
                punch[i][j] = True
    ans = "No"
    for i in range(3):
        if False not in punch[i]:
            ans = "Yes"
            break
        for j in range(3):
            if not punch[j][i]:
                break
        else:
            ans = "Yes"
            break
    if (punch[0][0] and punch[1][1] and punch[2][2]) or (
            punch[0][2] and punch[1][1] and punch[2][0]):
        ans = "Yes"
    print(ans)


resolve()
Buggy code:
a = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
b = [int(input()) for _ in range(10)]

c = [[0 for _ in range(3)] for _ in range(3)]
result = ""

for i in range(3):
    for j in range(3):
        if a[j][i] in b:
            c[j][i] = 1

for i in range(3):
    if c[i][0] == c[i][1] == c[i][2] == 1:
        result = "Yes"
        break
    elif c[0][i] == c[1][i] == c[2][i] == 1:
        result = "Yes"
        break

if c[0][0] == c[1][1] == c[2][2] == 1:
    result = "Yes"
elif c[0][2] == c[1][1] == c[2][0] == 1:
    result = "Yes"

if result is None:
    result ="No"

print(result)

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

c = [[0 for _ in range(3)] for _ in range(3)]
result = ""

for i in range(3):
    for j in range(3):
        if a[j][i] in b:
            c[j][i] = 1

for i in range(3):
    if c[i][0] == c[i][1] == c[i][2] == 1:
        result = "Yes"
        break
    elif c[0][i] == c[1][i] == c[2][i] == 1:
        result = "Yes"
        break

if c[0][0] == c[1][1] == c[2][2] == 1:
    result = "Yes"
elif c[0][2] == c[1][1] == c[2][0] == 1:
    result = "Yes"

if result == "":
    result ="No"

print(result)
Buggy code:
A = []
[A.extend(map(int, input().split())) for _ in range(3)]
_, *B = map(int, open(0).read().split())
for b in B:
    try:
        i = A.index(b)
        A[i] = 0
    except:
        pass
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],
]
ans = "No"
for line in lines:
    a, b, c = line
    if A[a] == 0 and A[a] == A[b] and A[a] == A[c]:
        ans = "Yes"
print(ans)


Fixed code:
A = []
[A.extend(map(int, input().split())) for _ in range(3)]
N = int(input())
B = [int(input()) for _ in range(N)]
for b in B:
    try:
        i = A.index(b)
        A[i] = 0
    except:
        pass
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],
]
ans = "No"
for line in lines:
    a, b, c = line
    if A[a] == 0 and A[a] == A[b] and A[a] == A[c]:
        ans = "Yes"
print(ans)
Buggy code:
S="012 345 678 036 147 258 048 246 "
A=sum([input().split()for i in range(4)],[])
for b in [input()for i in range(int(A[9]))]:
  if b in A:
    S=S.replace(str(A.index(b)),"")
print("YNeos"[1-"  "in S::2])

Fixed code:
S="012 345 678 036 147 258 048 246 "
A=sum([input().split()for i in range(4)],[])
for b in [input()for i in range(int(A[9]))]:
  if b in A:
    S=S.replace(str(A.index(b)),"")
print("YNeos"[not"  "in S::2])
Buggy code:
S="012 345 678 036 147 258 048 246 "
A=sum([input().split()for i in range(4)],[])
for b in [input()for i in range(int(A[10]))]:
  if b in A:
    S=S.replace(str(A.index(b)),"")
print("YNeos"[S.find("  ")<0::2])

Fixed code:
S="012 345 678 036 147 258 048 246 "
A=sum([input().split()for i in range(3)],[])
for b in [input()for i in range(int(input()))]:
  if b in A:
    S=S.replace(str(A.index(b)),"")
print("YNeos"[S.find("  ")<0::2])
Buggy code:
bingo = [list(map(int,input().split())) for i in range(3)]
N = int(input())
for _ in range(N):
    n = int(input())
    for i in range(3):
        for j in range(3):
            if bingo[i][j] == n:
                bingo[i][j] = -1

for i in range(3):
    if sum(bingo[i]) == -3:
        print("Yes")
        break
else:
    for i in range(3):
        if bingo[0][i]+bingo[1][i]+bingo[2][i] == -3:
            print("Yes")
            break
    else:
        if bingo[0][0]+bingo[1][1]+bingo[2][2] == -3 or bingo[0][2]+bingo[1][1]+bingo[2][0]:
            print("Yes")
        else:
            print("No")

Fixed code:
bingo = [list(map(int,input().split())) for i in range(3)]
N = int(input())
for _ in range(N):
    n = int(input())
    for i in range(3):
        for j in range(3):
            if bingo[i][j] == n:
                bingo[i][j] = -1

for i in range(3):
    if sum(bingo[i]) == -3:
        print("Yes")
        break
else:
    for i in range(3):
        if bingo[0][i]+bingo[1][i]+bingo[2][i] == -3:
            print("Yes")
            break
    else:
        if bingo[0][0]+bingo[1][1]+bingo[2][2] == -3 or bingo[0][2]+bingo[1][1]+bingo[2][0] == -3:
            print("Yes")
        else:
            print("No")
Buggy code:
bingo = []
b = []

for i in range(3):
  tmp = list(map(int,input().split()))
  bingo.append(tmp)

n = int(input())

while True:
  try:
    b.append(int(input()))
  except EOFError:
    break

lis1 = [bingo[0][0],bingo[0][1],bingo[0][2]]
lis2 = [bingo[1][0],bingo[1][1],bingo[1][2]]
lis3 = [bingo[2][0],bingo[2][1],bingo[2][2]]

lis4 = [bingo[0][0],bingo[1][0],bingo[2][0]]
lis5 = [bingo[0][1],bingo[1][1],bingo[2][1]]
lis6 = [bingo[0][2],bingo[1][2],bingo[2][2]]

lis7 = [bingo[0][0],bingo[1][1],bingo[2][2]]
lis8 = [bingo[0][2],bingo[1][1],bingo[2][0]]

allList = [lis1,lis2,lis3,lis4,lis5,lis6,lis7,lis8]

print(allList)
for i in allList:
  cnt = 0
  for _ in range(3):
    if i[_] in b:
      cnt +=1
  if cnt ==3:
    print("Yes")
    exit()
print("No")

Fixed code:
bingo = []
b = []

for i in range(3):
  tmp = list(map(int,input().split()))
  bingo.append(tmp)

n = int(input())

while True:
  try:
    b.append(int(input()))
  except EOFError:
    break

lis1 = [bingo[0][0],bingo[0][1],bingo[0][2]]
lis2 = [bingo[1][0],bingo[1][1],bingo[1][2]]
lis3 = [bingo[2][0],bingo[2][1],bingo[2][2]]

lis4 = [bingo[0][0],bingo[1][0],bingo[2][0]]
lis5 = [bingo[0][1],bingo[1][1],bingo[2][1]]
lis6 = [bingo[0][2],bingo[1][2],bingo[2][2]]

lis7 = [bingo[0][0],bingo[1][1],bingo[2][2]]
lis8 = [bingo[0][2],bingo[1][1],bingo[2][0]]

allList = [lis1,lis2,lis3,lis4,lis5,lis6,lis7,lis8]

for i in allList:
  cnt = 0
  for _ in range(3):
    if i[_] in b:
      cnt +=1
  if cnt ==3:
    print("Yes")
    exit()
print("No")
Buggy code:
table = []
for i in range(3):
    table.append(list(map(int, input().split())))
parts = int(input())
p_list = []
for i in range(parts):
    p_list.append(int(input()))

result = [[False, False, False], [False, False, False], [False, False, False]]
chk = 0
for r_idx, row in enumerate(table):
    for c_idx, col in enumerate(row):
        result[r_idx][c_idx] = col in p_list

for i in range(3):
    if result[i][0] and result[i][1] and result[i][2]:
        chk += 1
    if result[0][i] and result[1][i] and result[2][i]:
        chk += 1
    if result[i][i] and result[i][i] and result[i][i]:
        chk += 1

if result[0][2] and result[1][1] and result[2][0]:
    chk += 1

print('YES' if chk > 0 else 'NO')


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

result = [[False, False, False], [False, False, False], [False, False, False]]
chk = 0
for r_idx, row in enumerate(table):
    for c_idx, col in enumerate(row):
        result[r_idx][c_idx] = col in p_list


for i in range(3):
    if result[i][0] and result[i][1] and result[i][2]:
        chk += 1
    if result[0][i] and result[1][i] and result[2][i]:
        chk += 1

if result[0][0] and result[1][1] and result[2][2]:
    chk += 1

if result[0][2] and result[1][1] and result[2][0]:
    chk += 1

print('Yes' if chk > 0 else 'No')
Buggy code:
mat = [[map(int,input().split())] for i in range(3)]
mat = mat[0]+mat[1]+mat[2]

n = int(input())
for _ in range(n):
  m = int(input())
  for i in range(9):
    if mat[i] == m:
      mat[i] = 1000

if sum(mat[:3])>=3000:
  print("Yes")
elif sum(mat[3:6])>=3000:
  print("Yes")
elif sum(mat[6:])>=3000:
  print("Yes")
elif sum(mat[::3])>=3000:
  print("Yes")
elif sum(mat[1::3])>=3000:
  print("Yes")
elif sum(mat[2::3])>=3000:
  print("Yes")
elif sum(mat[::4])>=3000:
  print("Yes")
elif sum(mat[2:7:2])>=3000:
  print("Yes")
else:
  print("No")

Fixed code:
mat = [list(map(int,input().split())) for i in range(3)]
mat = mat[0]+mat[1]+mat[2]

n = int(input())
for _ in range(n):
  m = int(input())
  for i in range(9):
    if mat[i] == m:
      mat[i] = 1000

if sum(mat[:3])>=3000:
  print("Yes")
elif sum(mat[3:6])>=3000:
  print("Yes")
elif sum(mat[6:])>=3000:
  print("Yes")
elif sum(mat[::3])>=3000:
  print("Yes")
elif sum(mat[1::3])>=3000:
  print("Yes")
elif sum(mat[2::3])>=3000:
  print("Yes")
elif sum(mat[::4])>=3000:
  print("Yes")
elif sum(mat[2:7:2])>=3000:
  print("Yes")
else:
  print("No")
Buggy code:
import numpy as np

bingo = np.zeros([3,3])
check = np.zeros([3,3])
choice = []
flag = "No"

for i in range(3):
    a = input().split()
    a = [int(x) for x in a]
    bingo[i] = a
N = int(input())
for i in range(N):
    choice.append(int(input()))

convert = bingo.reshape([9])
for i in range(9):
    for j in range(N):
        if(convert[i] == j):
            ckeck[i//3][i%3] = 1
            continue

for i in range(3):
    if(check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1):
        flag = "Yes"
    elif(check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1):
        flag = "Yes"
if(check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1):
    flag = "Yes"
elif(check[2][0] == 1 and check[1][1] == 1 and check[0][2] == 1):
    flag = "Yes"

print(flag)


Fixed code:
import numpy as np

bingo = np.zeros([3,3])
check = np.zeros([3,3])
choice = []
flag = "No"

for i in range(3):
    a = input().split()
    a = [int(x) for x in a]
    bingo[i] = a
N = int(input())
for i in range(N):
    choice.append(int(input()))

convert = bingo.reshape([9])
for i in range(9):
    for j in choice:
        if(convert[i] == j):
            check[i//3][i%3] = 1
            continue

            
for i in range(3):
    if(check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1):
        flag = "Yes"
    elif(check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1):
        flag = "Yes"
if(check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1):
    flag = "Yes"
elif(check[2][0] == 1 and check[1][1] == 1 and check[0][2] == 1):
    flag = "Yes"

print(flag)