qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import sys
li = [list(map(int,input().split())) for i in range(3)]
n = int(input())
cnt = 0
for i in range(2):
    for j in range(2):
        for k in int(input()):
            if li[i][j] == k:
                li[i][j] == -1
            else:
                pass

for a in range(2):
    if li[a][0] == li[a][1] == li[a][2] == -1:
        print("Yes")
        sys.exit()
    else:
        pass
for b in range(2):
    if li[0][[b] == li[1][[b] == li[2][[b] == -1:
        print("Yes")
        sys.exit()
    else:
        pass
if li[0][[0] == li[1][[1] == li[2][[2] == -1:
    print("Yes")
    sys.exit()
else:
    pass
if li[0][[2] == li[1][[1] == li[2][[0] == -1:
    print("Yes")
    sys.exit()
else:
    print("No")

Fixed code:
import sys
li = [list(map(int,input().split())) for i in range(3)]
n = int(input())
k = [int(input()) for i in range(n)]
cnt = 0
for i in range(3):
    for j in range(3):
        if li[i][j] in k:
            li[i][j] = -1
        else:
            pass
for a in range(3):
    if li[a][0] == li[a][1] == li[a][2] == -1:
        print("Yes")
        exit()
    else:
        pass
for b in range(3):
    if li[0][b] == li[1][b] == li[2][b] == -1:
        print("Yes")
        exit()
    else:
        pass
if li[0][0] == li[1][1] == li[2][2] == -1:
    print("Yes")
    exit()

elif li[0][2] == li[1][1] == li[2][0] == -1:
    print("Yes")
    exit()
else:
    print("No")
Buggy code:
import numpy as np

a1 = list(map(int, input().split(' ')))
a2 = list(map(int, input().split(' ')))
a3 = list(map(int, input().split(' ')))
n = int(input())

nums = [int(input()) for _ in range(n)]

arr = np.array([a1, a2, a3])
mask = np.zeros_like(arr)

for num in nums:
    idx = np.where(arr == num)

    if len(idx[0]) == 0:
        pass
    else:
        mask[idx] = 1
    print(mask)

s_v = np.sum(mask, axis=0)
s_h = np.sum(mask, axis=0)
s_diag_1 = mask[0, 0] + mask[1, 1] + mask[2, 2]
s_diag_2 = mask[0, 2] + mask[1, 1] + mask[2, 0] 
s = np.maximum(np.concatenate([s_v, s_h, [s_diag_1], [s_diag_2]]) - 2, 0)

if np.max(s) > 0:
    print('Yes')
else:
    print('No')

Fixed code:
import numpy as np

a1 = list(map(int, input().split(' ')))
a2 = list(map(int, input().split(' ')))
a3 = list(map(int, input().split(' ')))
n = int(input())

nums = [int(input()) for _ in range(n)]

arr = np.array([a1, a2, a3])
mask = np.zeros_like(arr)

for num in nums:
    idx = np.where(arr == num)

    if len(idx[0]) == 0:
        pass
    else:
        mask[idx] = 1

s_v = np.sum(mask, axis=0)
s_h = np.sum(mask, axis=1)
s_diag_1 = mask[0, 0] + mask[1, 1] + mask[2, 2]
s_diag_2 = mask[0, 2] + mask[1, 1] + mask[2, 0] 
s = np.maximum(np.concatenate([s_v, s_h, [s_diag_1], [s_diag_2]]) - 2, 0)

if np.max(s) > 0:
    print('Yes')
else:
    print('No')
Buggy code:
a1 = input().split()
a2 = input().split()
a3 = input().split()
n = int(input())
ans = "No"
x = [0] * 9
for i in range(n):
    b = input()
    if b in a1:
        x[a1.index(b)] = 1
    if b in a2:
        x[a2.index(b)+3] = 1
    if b in a3:
        x[a3.index(b)+6] = 1

if x[0]+x[1]+x[2]==3 or x[3]+x[4]+x[5]==3 or x[6]+x[7]+x[8]==3 or x[0]+x[3]+x[6]==3 or x[1]+x[4]+x[7]==3 or x[2]+x[5]+x[8]==3 or x[0] + x[4] + x[8] == 3 or x[2]+x[4]+x[6]==3:
    ans = "Yes"
print(x)
print(ans)


Fixed code:
a1 = input().split()
a2 = input().split()
a3 = input().split()
n = int(input())
ans = "No"
x = [0] * 9
for i in range(n):
    b = input()
    if b in a1:
        x[a1.index(b)] = 1
    if b in a2:
        x[a2.index(b)+3] = 1
    if b in a3:
        x[a3.index(b)+6] = 1

if x[0]+x[1]+x[2]==3 or x[3]+x[4]+x[5]==3 or x[6]+x[7]+x[8]==3 or x[0]+x[3]+x[6]==3 or x[1]+x[4]+x[7]==3 or x[2]+x[5]+x[8]==3 or x[0] + x[4] + x[8] == 3 or x[2]+x[4]+x[6]==3:
    ans = "Yes"
    
print(ans)
Buggy code:
A = [list(map(int,input().split())) for i in range(3)]
A_flat=[]
for i in range(len(A)):
    A_flat.append(A[i][0])
    A_flat.append(A[i][1])
    A_flat.append(A[i][2])

N = int(input())
b = [int(input()) for i in range(N)]
for i in range(len(b)):
    if b[i] in A_flat:
        index = A_flat.index(b[i])
        A_flat[index] = 0

 judge=False
for i in range(3):
    if A_flat[0+i] == A_flat[3+i] == A_flat[6+i]:
        print("Yes")
        judge = True
        break
    elif A_flat[0+i*3]==A_flat[1+i*3]==A_flat[2+i*3]:
        print("Yes")
        judge = True
        break
    elif A_flat[0]==A_flat[4]==A_flat[8] or A_flat[2]==A_flat[4]==A_flat[6]:
        print("Yes")
        judge = True
        break

if judge is False:
    print("No")


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

N = int(input())
b = [int(input()) for i in range(N)]
for i in range(len(b)):
    if b[i] in A_flat:
        index = A_flat.index(b[i])
        A_flat[index] = 0

judge=False
for i in range(3):
    if A_flat[0+i] == A_flat[3+i] == A_flat[6+i]:
        print("Yes")
        judge = True
        break
    elif A_flat[0+i*3]==A_flat[1+i*3]==A_flat[2+i*3]:
        print("Yes")
        judge = True
        break
    elif A_flat[0]==A_flat[4]==A_flat[8] or A_flat[2]==A_flat[4]==A_flat[6]:
        print("Yes")
        judge = True
        break

if judge is False:
    print("No")
Buggy code:
A = []
out = []
for x in range(3):
    A.append(list(map(int, input().split())))
    out.append([0, 0, 0])
N = int(input())
b = []
for B in range(N):
    b.append(int(input()))
for pick in b:
    for y in range(3):
        for x in range(3):
            if pick == A[y][x]:
                out[y][x] = 1

bingo = False
for x in range(3):
    if out[x][0] == 1 and out[x][1]　== 1 and out[x][2] == 1:
        bingo = True

for x in range(3):
    if out[0][x] == 1 and out[1][x] == 1 and out[2][x] == 1:
        bingo = True

for x in range(3):
    if out[0][0] == 1 and out[1][1] == 1 and out[2][2] == 1:
        bingo = True

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

if bingo:
    print("Yes")
else:
    print("No")


Fixed code:
A = []
out = []
for x in range(3):
    A.append(list(map(int, input().split())))
    out.append([0, 0, 0])
N = int(input())
b = []
for B in range(N):
    b.append(int(input()))
for pick in b:
    for y in range(3):
        for x in range(3):
            if pick == A[y][x]:
                out[y][x] = 1

bingo = False
for x in range(3):
    if out[x][0] == 1 and out[x][1] == 1 and out[x][2] == 1:
        bingo = True

for x in range(3):
    if out[0][x] == 1 and out[1][x] == 1 and out[2][x] == 1:
        bingo = True

for x in range(3):
    if out[0][0] == 1 and out[1][1] == 1 and out[2][2] == 1:
        bingo = True

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

if bingo:
    print("Yes")
else:
    print("No")
Buggy code:
seen = [0,0,0,0,0,0,0,0,0]
seen[0],seen[1],seen[2] = (map(int,input().split()))
seen[3],seen[4],seen[5] = (map(int,input().split()))
seen[6],seen[7],seen[8] = (map(int,input().split()))
over = False
N = int(input())
for x in range(N):
  num = int(input())
  if num in seen:
    seen[seen.index(num)] = "O"
if seen[0] == "O":
  if seen[1] == seen[2] == "O":
    over = True
  elif seen[3] == seen[6] == "O":
    over = True
  elif seen[4] == seen[8] == "O":
    over = True
elif seen[4] == "O":
  if seen[2] == seen[6] == "O":
    over = True
  elif seen[1] == seen[7] == "O":
    over = True
  elif seen[3] == seen[5] == "O":
    over = True
elif seen[8] == "O":
  if seen[6] == seen[7] == "O":
    over = True
  if seen[2] == seen[5] == "O":
    over = True
if not over:
  print("NO")
else:
  print("YES")

Fixed code:
seen = [0,0,0,0,0,0,0,0,0]
seen[0],seen[1],seen[2] = (map(int,input().split()))
seen[3],seen[4],seen[5] = (map(int,input().split()))
seen[6],seen[7],seen[8] = (map(int,input().split()))
over = False
N = int(input())
for x in range(N):
  num = int(input())
  if num in seen:
    seen[seen.index(num)] = "O"
if seen[0] == "O":
  if seen[1] == seen[2] == "O":
    over = True
  elif seen[3] == seen[6] == "O":
    over = True
  elif seen[4] == seen[8] == "O":
    over = True
elif seen[4] == "O":
  if seen[2] == seen[6] == "O":
    over = True
  elif seen[1] == seen[7] == "O":
    over = True
  elif seen[3] == seen[5] == "O":
    over = True
elif seen[8] == "O":
  if seen[6] == seen[7] == "O":
    over = True
  if seen[2] == seen[5] == "O":
    over = True
if not over:
  print("No")
else:
  print("Yes")
Buggy code:
a = [[0] * 3 for i in range(3)]
for i in range(3):
    a[i] = list(map(int, input().split(' ')))

n = int(input())

for i in range(n):
    b = int(input())
    
    for r in range(3):
        for c in range(3):
            if a[r][c] == b:
                a[r][c] = 0

a = np.array(a)
sum1 = a.sum(axis=0)
sum2 = a.sum(axis=1)
naname1 = a[0][0] + a[1][1] + a[2][2]
naname2 = a[0][2] + a[1][1] + a[2][0]

if 0 in sum1 or 0 in sum2 or naname1 == 0 or naname2 == 0:
    print('Yes')
else:
    print('No')

Fixed code:
import numpy as np

a = [[0] * 3 for i in range(3)]
for i in range(3):
    a[i] = list(map(int, input().split(' ')))

n = int(input())

for i in range(n):
    b = int(input())
    
    for r in range(3):
        for c in range(3):
            if a[r][c] == b:
                a[r][c] = 0

a = np.array(a)
sum1 = a.sum(axis=0)
sum2 = a.sum(axis=1)
naname1 = a[0][0] + a[1][1] + a[2][2]
naname2 = a[0][2] + a[1][1] + a[2][0]

if 0 in sum1 or 0 in sum2 or naname1 == 0 or naname2 == 0:
    print('Yes')
else:
    print('No')
Buggy code:
a,b,c = [input().split() for i in range(3)]

a.extend(b)
a.extend(c)
N = int(input())
b = [input() for i in range(N)]
for b1 in b:
    a = ['a' if b1 == s in s else s for s in a]

if a[0] == 'a' and a[1] == 'a' and a[2] == 'a':
    print("Yes")
elif a[3] == 'a' and a[4] == 'a' and a[5] == 'a':
    print("Yes")
elif a[6] == 'a' and a[7] == 'a' and a[8] == 'a':
    print("Yes")
elif a[0] == 'a' and a[3] == 'a' and a[6] == 'a':
    print("Yes")
elif a[1] == 'a' and a[4] == 'a' and a[7] == 'a':
    print("Yes")
elif a[2] == 'a' and a[5] == 'a' and a[8] == 'a':
    print("Yes")
elif a[0] == 'a' and a[4] == 'a' and a[8] == 'a':
    print("Yes")
elif a[2] == 'a' and a[4] == 'a' and a[6] == 'a':
    print("Yes")

Fixed code:
a,b,c = [input().split() for i in range(3)]

a.extend(b)
a.extend(c)
N = int(input())
b = [input() for i in range(N)]
for b1 in b:
    a = ['a' if b1 == s in s else s for s in a]

if a[0] == 'a' and a[1] == 'a' and a[2] == 'a':
    print("Yes")
elif a[3] == 'a' and a[4] == 'a' and a[5] == 'a':
    print("Yes")
elif a[6] == 'a' and a[7] == 'a' and a[8] == 'a':
    print("Yes")
elif a[0] == 'a' and a[3] == 'a' and a[6] == 'a':
    print("Yes")
elif a[1] == 'a' and a[4] == 'a' and a[7] == 'a':
    print("Yes")
elif a[2] == 'a' and a[5] == 'a' and a[8] == 'a':
    print("Yes")
elif a[0] == 'a' and a[4] == 'a' and a[8] == 'a':
    print("Yes")
elif a[2] == 'a' and a[4] == 'a' and a[6] == 'a':
    print("Yes")
else:
    print("No")
Buggy code:
import sys
import numpy as np

lines = sys.stdin.readlines()
bingo_card = np.zeros([3,3])
for i, l in enumerate(input()):
    if i <= 2:
        bingo_card[i] = [int(num) for num in l.split()]
    else:
        bingo_card[bingo_card == int(l)] = None
        
check_arr = np.isnan(bingo_card)
if check_arr[0].sum() == 3 or check_arr[1].sum() == 3 or check_arr[2].sum() == 3:
    print('Yes')
elif check_arr[:, 0].sum() == 3 or check_arr[:, 1].sum() == 3 or check_arr[:, 2].sum() == 3:
    print('Yes')
elif check_arr[0,0] and check_arr[1,1] and check_arr[2,2]:
    print('Yes')
elif check_arr[0,2] and check_arr[1,1] and check_arr[2,0]:
    print('Yes')
else:
    print('No')

Fixed code:
import sys
import numpy as np

lines = sys.stdin.readlines()
bingo_card = np.zeros([3,3])
for i, l in enumerate(lines):
    if i <= 2:
        bingo_card[i] = [int(num) for num in l.split()]
    else:
        bingo_card[bingo_card == int(l)] = None
        
check_arr = np.isnan(bingo_card)
if check_arr[0].sum() == 3 or check_arr[1].sum() == 3 or check_arr[2].sum() == 3:
    print('Yes')
elif check_arr[:, 0].sum() == 3 or check_arr[:, 1].sum() == 3 or check_arr[:, 2].sum() == 3:
    print('Yes')
elif check_arr[0,0] and check_arr[1,1] and check_arr[2,2]:
    print('Yes')
elif check_arr[0,2] and check_arr[1,1] and check_arr[2,0]:
    print('Yes')
else:
    print('No')
Buggy code:
A = [list(map(int, input().split())) for i in range(3)]
N = int(input())
b = [int(input()) for i in range(N)]
print(A)

for i in range(3):
  for j in range(3):
    if A[i][j] in b:
      A[i][j] = 0
  
for i in range(3):
  if A[i][0] + A[i][1] + A[i][2] == 0 or A[0][i] + A[1][i] + A[2][i] == 0 or A[0][0]+A[1][1]+A[2][2] ==0 or A[2][0]+A[1][1]+A[0][2] ==0:
    print('Yes')
    break
  
  else:
    print('No')
    break

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

for i in range(3):
  for j in range(3):
    if A[i][j] in b:
      A[i][j] = 0
  
for i in range(3):
  if A[i][0] + A[i][1] + A[i][2] == 0 or A[0][i] + A[1][i] + A[2][i] == 0 or A[0][0]+A[1][1]+A[2][2] ==0 or A[2][0]+A[1][1]+A[0][2] ==0:
    judge += 1
  
  else:
    judge += 0
    
if judge >= 1:
  print('Yes')
  
else:
  print('No')
Buggy code:
card = [[int(x) for x in input().split()] for y in range(3)]
bools = [[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
for _ in range(n):
  x = int(input())
  for i in range(3):
    for j in range(3):
      if x == card[i][j]:
        bools[i][j] = 1
ok = False
for i in range(3):
  if (bools[i][0], bools[i][1], bools[i][2]) == (1,1,1) or 
  (bools[0][i], bools[1][i], bools[2][i]) == (1,1,1):
    ok = True
if (bools[0][0],bools[1][1],bools[2][2]) == (1,1,1) or (bools[0][2], bools[1][1], bools[2][0]) == (1,1,1):
  ok = True
print("Yes" if ok else "No")

Fixed code:
card = [[int(x) for x in input().split()] for y in range(3)]
bools = [[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
for _ in range(n):
  x = int(input())
  for i in range(3):
    for j in range(3):
      if x == card[i][j]:
        bools[i][j] = 1
ok = False
for i in range(3):
  if (bools[i][0], bools[i][1], bools[i][2]) == (1,1,1) or (bools[0][i], bools[1][i], bools[2][i]) == (1,1,1):
    ok = True
if (bools[0][0],bools[1][1],bools[2][2]) == (1,1,1) or (bools[0][2], bools[1][1], bools[2][0]) == (1,1,1):
  ok = True
print("Yes" if ok else "No")
Buggy code:
bingo = []
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

N = int(input())

for i in range(N):
    n = int(input())
    if n in a:
        a[a.index(n)] = 0
    elif n in b:
        b[b.index(n)] = 0
    elif n in c:
        c[c.index(n)] = 0

if sum(a) == 0 or sum(b) == 0 or sum(c) == 0 or a[0]+ b[1] + c[2] == 0 or a[2] + b[1] + c[0] == 0 :
    print("Yes")
elif a[0] + b[0]+ c[0] ==0 or a[1] + b[1]+ c[1] or a[2] + b[2]+ c[2] :
    print("Yes")
else:print("No")


Fixed code:
bingo = []
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

N = int(input())

for i in range(N):
    n = int(input())
    if n in a:
        a[a.index(n)] = 0
    elif n in b:
        b[b.index(n)] = 0
    elif n in c:
        c[c.index(n)] = 0

if sum(a) == 0 or sum(b) == 0 or sum(c) == 0 or a[0]+ b[1] + c[2] == 0 or a[2] + b[1] + c[0] == 0 :
    print("Yes")
elif a[0] + b[0]+ c[0] ==0 or a[1] + b[1]+ c[1] == 0 or a[2] + b[2]+ c[2] == 0 :
    print("Yes")
else:print("No")
Buggy 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 b:
      if a[j][i] == k:
            a[j][i] = 'o'
a1 = list(set(a[0]))
a2 = list(set(a[1]))
a3 = list(set(a[2]))
a4 = list(set((a[0][0],a[1][1],a[2][2])))
a5 = list(set((a[0][2],a[1][1],a[2][0])))
a6 = list(set((a[0][0],a[1][0],a[2][0])))
a7 = list(set((a[0][1],a[1][1],a[2][1])))
a8 = list(set((a[0][2],a[1][2],a[2][2])))
p = ['o']
A = [a1,a2,a3,a4,a5,a6,a7,a8]
for i in A:
    ans = 'No'
    if i == p:
        ans = 'Yes'
        break
print(ans)
print(A)

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 b:
      if a[j][i] == k:
            a[j][i] = 'o'
a1 = list(set(a[0]))
a2 = list(set(a[1]))
a3 = list(set(a[2]))
a4 = list(set((a[0][0],a[1][1],a[2][2])))
a5 = list(set((a[0][2],a[1][1],a[2][0])))
a6 = list(set((a[0][0],a[1][0],a[2][0])))
a7 = list(set((a[0][1],a[1][1],a[2][1])))
a8 = list(set((a[0][2],a[1][2],a[2][2])))
p = ['o']
A = [a1,a2,a3,a4,a5,a6,a7,a8]
for i in A:
    ans = 'No'
    if i == p:
        ans = 'Yes'
        break
print(ans)
Buggy code:
a=[list(input().split()) for i in range(3)]

n=int(input())

b=list(int(input()) for i in range(n))

c=[[0]*3 for i in range(3)]

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

answer="No"

for i in range(3):
    if (c[i][0] and c[i][1] and c[i][2]):
        answer="Yes"
    if (c[0][i] and c[1][i] and c[2][i]):
        answer="Yes"
if (c[0][0] and c[1][1] and c[2][2]):
    answer="Yes"
if (c[0][2] and c[1][1] and c[2][0]):
    answer="Yes"

print(answer)

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

n=int(input())

b=list(int(input()) for i in range(n))

c=[[0]*3 for i in range(3)]

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

answer="No"

for i in range(3):
    if (c[i][0] and c[i][1] and c[i][2]):
        answer="Yes"
    if (c[0][i] and c[1][i] and c[2][i]):
        answer="Yes"
if (c[0][0] and c[1][1] and c[2][2]):
    answer="Yes"
if (c[0][2] and c[1][1] and c[2][0]):
    answer="Yes"

print(answer)
Buggy code:
import numpy as np
A = np.array([list(map(int,input().split())) for i in range(3)])
N = int(input())
b = [int(input()) for i in range(N)]
B = np.array([[0]*3 for i in range(3)])
for _ in b:
    for t in range(3):
        for y in range(3):
            if A[t][y] == _:
                B[t][y] = 1
ans = "No"
for i in range(3):
    if all(A[i] == [1,1,1]):
        ans ="Yes"
    if all(A[:,i] == [1,1,1]):
        ans ="Yes"
if A[0,0] == 1 and A[1,1] == 1 and A[2,2] == 1:
    ans ="Yes"
if A[2,0] == 1 and A[1,1] == 1 and A[0,2] == 1:
    ans ="Yes"
print(ans)

Fixed code:
import numpy as np
A = np.array([list(map(int,input().split())) for i in range(3)])
N = int(input())
b = [int(input()) for i in range(N)]
B = np.array([[0]*3 for i in range(3)])
for _ in b:
    for t in range(3):
        for y in range(3):
            if A[t][y] == _:
                B[t][y] = 1
ans = "No"
for i in range(3):
    if all(B[i] == [1,1,1]):
        ans ="Yes"
    if all(B[:,i] == [1,1,1]):
        ans ="Yes"
if B[0,0] == 1 and B[1,1] == 1 and B[2,2] == 1:
    ans ="Yes"
if B[2,0] == 1 and B[1,1] == 1 and B[0,2] == 1:
    ans ="Yes"
print(ans)
Buggy code:
a_list = list(map(int, input().split()))
b_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))
N = int(input())
d_list = [int(input()) for k in range(N)]

for n in range(3):
    for p in range(3):
        if d_list[n] == a_list[p]:
            a_list[p] = 555
    for q in range(3):
        if d_list[n] == b_list[q]:
            b_list[q] = 555
    for r in range(3):
        if d_list[n] == c_list[r]:
            c_list[r] = 555

if a_list[0] == a_list[1] == a_list[2]:
    print('Yes')

elif b_list[0] == b_list[1] == b_list[2]:
    print('Yes')

elif c_list[0] == c_list[1] == c_list[2]:
    print('Yes')

elif a_list[0] == b_list[0] == c_list[0]:
        print('Yes')
elif a_list[1] == b_list[1] == c_list[1]:
        print('Yes')
elif a_list[2] == b_list[2] == c_list[2]:
    print('Yes')
elif a_list[0] == b_list[1] == c_list[2]:
    print('Yes')

elif a_list[2] == b_list[1] == c_list[0]:
    print('Yes')
else:
    print('No')

   

Fixed code:
a_list = list(map(int, input().split()))
b_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))
N = int(input())
d_list = [int(input()) for k in range(N)]


for n in range(N):
    for p in range(3):
        if d_list[n] == a_list[p]:
            a_list[p] = 555
    for q in range(3):
        if d_list[n] == b_list[q]:
            b_list[q] = 555
    for r in range(3):
        if d_list[n] == c_list[r]:
            c_list[r] = 555

if a_list[0] == a_list[1] == a_list[2] == 555:
    print('Yes')

elif b_list[0] == b_list[1] == b_list[2] == 555:
    print('Yes')

elif c_list[0] == c_list[1] == c_list[2] == 555:
    print('Yes')

elif a_list[0] == b_list[0] == c_list[0] == 555:
        print('Yes')
elif a_list[1] == b_list[1] == c_list[1] == 555:
        print('Yes')
elif a_list[2] == b_list[2] == c_list[2] == 555:
    print('Yes')
elif a_list[0] == b_list[1] == c_list[2] == 555:
    print('Yes')

elif a_list[2] == b_list[1] == c_list[0] == 555:
    print('Yes')
else:
    print('No')
Buggy code:
nums = []

for i in range(3):
    nums.append([int(n) for n in input().split(" ")])
print(nums)

bingo_list = []

bingo_list.extend(nums)
for i in range(3):
    bingo_list.append([nums[0][i], nums[1][i], nums[2][i]])
bingo_list.append([nums[0][0], nums[1][1], nums[2][2]])
bingo_list.append([nums[2][0], nums[1][1], nums[0][2]])

print(bingo_list)

is_bingo = False
n = int(input())
for i in range(n):
    num = int(input())
    for bingo in bingo_list:
        if num in bingo:
            bingo.remove(num)
            if not bingo:
                print("Yes")
                is_bingo = True

if not is_bingo:
    print("No")

Fixed code:
nums = []

for i in range(3):
    nums.append([int(n) for n in input().split(" ")])

bingo_list = []

bingo_list.extend(nums)
for i in range(3):
    bingo_list.append([nums[0][i], nums[1][i], nums[2][i]])
bingo_list.append([nums[0][0], nums[1][1], nums[2][2]])
bingo_list.append([nums[2][0], nums[1][1], nums[0][2]])

is_bingo = False
n = int(input())
for i in range(n):
    num = int(input())
    for bingo in bingo_list:
        if num in bingo:
            bingo.remove(num)
            if not bingo:
                is_bingo = True

if is_bingo:
    print("Yes")
else:
    print("No")
Buggy code:
card = []

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

n = int(input())

b = []

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

ans = "No"

for i in range(3):
    if card[i][0] in b and card[i][1] in b and card[i][2] in b:
        ans = "Yes"
for i in range(3):
    if card[0][i] in b and card[1][i] in b and card[2][i] in b:
        ans = "Yes"
if card[0][0] and card[1][1] and card[2][2]:
    ans = "Yes"
if card[0][2] and card[1][1] and card[2][0]:
    ans = "Yes"


print(ans)

Fixed code:
card = []

for _ in range(3):
    card.append(list(map(int, input().split())))
n = int(input())
b = []
for _ in range(n):
    b.append(int(input()))

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


print('No')