Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
x=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    if j==y:
        x='x'
    else:
        x=j
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')

A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
x=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    if j==y:
        x='X'
    else:
        x=[j for j in x]
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')

A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
x=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    x=['X' if j==y else j for j in x]
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')

A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
x=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    if j==y:
        x='x'
    else:
        x=[j for j in x]
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')

A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
X=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    X=['X' if j==y else j for j in x]
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')

A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
X=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    X=['X' if j==y else j for j in X]
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted