Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a=[map(int,input().split()) for _ in range(3)]
n=int(input())
b=[int(input()) for _ in range(n)]
used=[[False]*3 for _ in range(3)]
for k in range(n):
    for i in range(3):
        for j in range(3):
            if a[i][j]==b[k]:
                used[i][j]==True

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

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

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

Fixed submission:
a=[list(map(int,input().split())) for _ in range(3)]
n=int(input())
b=[int(input()) for _ in range(n)]
used=[[False]*3 for _ in range(3)]
for k in range(n):
    for i in range(3):
        for j in range(3):
            if a[i][j]==b[k]:
                used[i][j]=True

for i in range(3):
    if used[0][i] and used[1][i] and used[2][i]:
        print("Yes")
        exit()
        
for i in range(3):
    if used[i][0] and used[i][1] and used[i][2]:
        print("Yes")
        exit()

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

if used[0][2] and used[1][1] and used[2][0]:
        print("Yes")
        exit()                
print("No")

Buggy python submission (verdict: Runtime Error):
a=[map(int,input().split() for _ in range(3)]
n=int(input())
b=[int(input()) for _ in range(n)]
used=[[False]*3 for _ in range(3)]
for k in range(n):
    for i in range(3):
        for j in range(3):
            if a[i][j]==b[k]:
                used[i][j]==True

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

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

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

Fixed submission:
a=[list(map(int,input().split())) for _ in range(3)]
n=int(input())
b=[int(input()) for _ in range(n)]
used=[[False]*3 for _ in range(3)]
for k in range(n):
    for i in range(3):
        for j in range(3):
            if a[i][j]==b[k]:
                used[i][j]=True

for i in range(3):
    if used[0][i] and used[1][i] and used[2][i]:
        print("Yes")
        exit()
        
for i in range(3):
    if used[i][0] and used[i][1] and used[i][2]:
        print("Yes")
        exit()

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

if used[0][2] and used[1][1] and used[2][0]:
        print("Yes")
        exit()                
print("No")
Buggy python submission (verdict: Runtime Error):
N,R=map(int,input())
if N>=10:
    print(R)
else:
    print(R+100*(10-N))

Fixed submission:
N,R=map(int,input().split())
if N>=10:
    print(R)
else:
    print(R+100*(10-N))
Buggy python submission (verdict: Runtime Error):
s=input()
for i in range(len(s)):
    s[i]="x"
print(s)

Fixed submission:
s=input()
print("x"*len(s))

Buggy python submission (verdict: Runtime Error):
s=input()
for i in range(len(s)):
    s[i].replace("x")
print(s)

Fixed submission:
s=input()
print("x"*len(s))
Buggy python submission (verdict: Runtime Error):
H,A=map(int,input())
print(H//A+1)

Fixed submission:
H,A=map(int,input().split())
print((H+A-1)//A)
Buggy python submission (verdict: Runtime Error):
K,X=(int,input().split())
if 500*K>=X:
    print("Yes")
else:
    print("No")

Fixed submission:
K,X=map(int,input().split())
if 500*K >=X:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
K,X=(int,input().split()))
if 500*K>=X:
    print("Yes")
else:
    print("No")

Fixed submission:
K,X=map(int,input().split())
if 500*K >=X:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
S,T=input(),split()
print(T+S)


Fixed submission:
S,T=input().split()
print(T+S)

Buggy python submission (verdict: Runtime Error):
S,T=map(int,input(),split())
print(T+S)

Fixed submission:
S,T=input().split()
print(T+S)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s,t=input().split()
ans=0
for i in range(n):
    ans=ans+s[i]+t[i]
print(ans)

Fixed submission:
n=int(input())
s,t=input().split()
ans=s[0]+t[0]
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=s[0]+t[0]
s,t=input().split()
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)

Fixed submission:
n=int(input())
s,t=input().split()
ans=s[0]+t[0]
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input().split())
ans=s[0]+t[0]
s,t=input().split()
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)

Fixed submission:
n=int(input())
s,t=input().split()
ans=s[0]+t[0]
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input().split())
ans=0
s,t=input().split()
for i in range(n):
    ans=ans+s[i]+t[i]
print(ans)

Fixed submission:
n=int(input())
s,t=input().split()
ans=s[0]+t[0]
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
a=list(input().split())
if sum(a)>=22:
  print("bust")
elif sum(a)<=21:
  print("win")

Fixed submission:
a=list(map(int,input().split()))
if sum(a)>=22:
  print("bust")
elif sum(a)<=21:
  print("win")
Buggy python submission (verdict: Runtime Error):
s=input()
a=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-a.index(a))


Fixed submission:
s=input()
a=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-a.index(s))
Buggy python submission (verdict: Runtime Error):
S=input()
a=["Sunny", "Cloudy", "Rainy"]
print(a[(a.index(S)+1)])

Fixed submission:
S=input()
a=["Sunny", "Cloudy", "Rainy"]
print(a[((a.index(S)+1))%3])

Buggy python submission (verdict: Runtime Error):
if S=="Sunny":
    print(Cloudy)
if S=="Cloudy":
    print(Rainy)
if S=="Rainy":
    print(Sunny)

Fixed submission:
S=input()
a=["Sunny", "Cloudy", "Rainy"]
print(a[((a.index(S)+1))%3])

Buggy python submission (verdict: Runtime Error):
def S:
    sample_list = ['Sunny', 'Cloudy', 'Rainy']
random.shuffle(sample_list)
print sample_list
if S==Sunny:
  print(Cloudy)
if S==Cloudy:
  print(Rainy)
if S==Rainy:
  print(Sunny)


Fixed submission:
S=input()
a=["Sunny", "Cloudy", "Rainy"]
print(a[((a.index(S)+1))%3])
Buggy python submission (verdict: Runtime Error):
s=input()
t=input()
for i in range(3)
ans=0
if s[i]==t[i]:
  ans+=1
print(ans)

Fixed submission:
s=input()
t=input()
ans=0
for i in range(3):
  if s[i]==t[i]:
    ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
a=input()
s=input()
if a>=3200:
  print(s)
else:
  print("red")

Fixed submission:
a=int(input())
s=input()
if a>=3200:
  print(s)
else:
  print("red")
Buggy python submission (verdict: Runtime Error):
s=list(input())
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No)


Fixed submission:
s=input()
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
s=input()
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No)


Fixed submission:
s=input()
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
s=input()
if len(set(s))==2 and s.count(s[0])==2:
  print("Yes")
else:
  print("No)

Fixed submission:
s=input()
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a,b=map(input().split())
if a>=13:
  print(b)
elif 12<=a<=6:
  print(b//2)
else:
  print(0)

Fixed submission:
a,b=map(int,input().split())
if a>=13:
  print(b)
elif 6<=a<=12:
  print(b//2)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
s=input()
print(s[:k-1]+s[k-1].lower+s[k:])

Fixed submission:
n,k=map(int,input().split())
s=input()
print(s[:k-1]+s[k-1].lower()+s[k:])
Buggy python submission (verdict: Runtime Error):
X=int(input())
if X== 3,5, 7:
  print("YES")
else:
  print("NO")


Fixed submission:
X=int(input())
if X== 3 or X==5 or X==7:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%2== and b%2==0:
    print("Yes")
else:
    print("No")

Fixed submission:
a,b=map(int,input().split())
if a%2!=0 and b%2!=0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
r=input()
if r<1200:
    print("ABC")
elif 1200<r<2800:
    print("ARC")
else:
    print("AGC")

Fixed submission:
r=int(input())
if r<1200:
    print("ABC")
elif 1200<=r<2800:
    print("ARC")
else:
    print("AGC")
Buggy python submission (verdict: Runtime Error):
li=a,b,c=list(map(int,input().split()))
lis=sorted(li)
print(lis[2]-lis[0)


Fixed submission:
li=a,b,c=list(map(int,input().split()))
lis=sorted(li)
print(lis[2]-lis[0])
Buggy python submission (verdict: Runtime Error):
import math
N=int(input())
print(2*N//gcd(2,N))

Fixed submission:
import math
N=int(input())
print(2*N//math.gcd(2,N))
Buggy python submission (verdict: Runtime Error):
S=input()
print(S.cout("+")-S.count("-"))


Fixed submission:
S=input()
print(S.count("+")-S.count("-"))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(max(a+b,a=b,a*b))

Fixed submission:
a,b=map(int,input().split())
print(max(a+b,a-b,a*b))
Buggy python submission (verdict: Runtime Error):
s=list(input())
print(700+s.count(○))


Fixed submission:
print(700 + 100 * input().count('o'))

Buggy python submission (verdict: Runtime Error):
s=list(input())
print(700++s.count(○))


Fixed submission:
print(700 + 100 * input().count('o'))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(mix(a,b)+min(c,d))

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(min(a,b)+min(c,d))
Buggy python submission (verdict: Runtime Error):
x,y=map(int,input().split())
if x<y:
    print("<")
elif x>y:
    print(">")
else:
    print("=")

Fixed submission:
x,y=input().split()
if x<y:
    print("<")
elif x>y:
    print(">")
else:
    print("=")
Buggy python submission (verdict: Runtime Error):
x,t=map(int,input().split())
print(x-t if x-t>=0,0 else)

Fixed submission:
x,t=map(int,input().split())
print(x-t) if x-t>=0 else print(0)
Buggy python submission (verdict: Runtime Error):
x,a,b=map(int,input().split())
print(min(abs(x-a),abs(x-b))


Fixed submission:
x,a,b=map(int,input().split())
if min(abs(x-a),abs(x-b))==abs(x-a):
    print("A")
else:
    print("B")
Buggy python submission (verdict: Runtime Error):
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
if (x in a and y in a):
    ptint("yes")
elif   (x in b and y in b):
    print("Yes")
elif   (x in c and y in c):
    print("Yes")
else:
    print("No")


Fixed submission:
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
if x in a and y in a:
    print("Yes")
elif x in b and y in b:
    print("Yes")
elif x in c and y in c:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
if (x in a and y in a) or (x in b and y in b) or (x in c and y in c):
    ptint("yes")
else:
    print("No")

Fixed submission:
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
if x in a and y in a:
    print("Yes")
elif x in b and y in b:
    print("Yes")
elif x in c and y in c:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a[-1]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO")

Fixed submission:
a,b,c=input().split()
if a[-1]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a,b,c=int(input().split())
if (b-a)==(c-b):
    print("YES")
else:
    print("NO")


Fixed submission:
a,b,c=map(int,input().split())
if b-a==c-b:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a,b,c=int(input().split())
if b-a==c-b:
    print("YES")
else:
    print("NO")

Fixed submission:
a,b,c=map(int,input().split())
if b-a==c-b:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
print((a+b)%24)

Fixed submission:
a,b=map(int,input().split())
print((a+b)%24)
Buggy python submission (verdict: Runtime Error):
n=int(input())
print(800*n-200*(n//15)

Fixed submission:
n=int(input())
print(800*n-200*(n//15))
Buggy python submission (verdict: Runtime Error):
s=input()
print(s.split(,))

Fixed submission:
s=input()
print(s.replace(","," "))
Buggy python submission (verdict: Runtime Error):
a,op,b=input().split())
if op=="+":
    print(int(a)+int(b))
else:
    print(int(a)-int(b))

Fixed submission:
a,op,b=input().split()
if op=="+":
    print(int(a)+int(b))
else:
    print(int(a)-int(b))
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a+b=c or a+c=b or b+c=a:
    print("Yes")
else:
    print("No")

Fixed submission:
a,b,c=map(int,input().split())
if a+b==c or a+c==b or b+c==a:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
a,b,c=input().split()
if a+b=c or a+c=b or b+c=a:
    print("Yes")
else:
    print("No")

Fixed submission:
a,b,c=map(int,input().split())
if a+b==c or a+c==b or b+c==a:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n%10 == 3:
    print("bon")
else if n%10 in [0,1,6,8]:
    print("pon")
else:
    print('hon')

Fixed submission:
n=int(input())
if n%10 == 3:
    print("bon")
elif n%10 in [0,1,6,8]:
    print("pon")
else:
    print('hon')
Buggy python submission (verdict: Runtime Error):
f=open('in','r')
input=lambda:f.readline().strip()

s=input()
if s[-1]!='s':print(s+'s')
else:print(s+'es')

Fixed submission:
s=input()
if s[-1]!='s':print(s+'s')
else:print(s+'es')
Buggy python submission (verdict: Runtime Error):
f=open('in','r')
input=lambda:f.readline().strip()

n=int(input())
r=list(map(int,input().split()))
mod=1000000007
s=sum(r)%mod
x=0
for u in r:
  x+=u**2
x%=mod
t=500000004
print((s**2-x)*t%mod)

Fixed submission:
# f=open('in','r')
# input=lambda:f.readline().strip()

n=int(input())
r=list(map(int,input().split()))
mod=1000000007
s=sum(r)%mod
x=0
for u in r:
  x+=u**2
x%=mod
t=500000004
print((s**2-x)*t%mod)
Buggy python submission (verdict: Runtime Error):
n=int(input())
r=list(map(int,input().split()))
t=0
for i in range(n):
  for j in range(i+1,n):
	for k in range(j+1,n):
      s=[r[i],r[j],r[k]]
      s.sort()
      if s[0]+s[1]>s[2]:t+=1
print(t)

Fixed submission:
n=int(input())
r=list(map(int,input().split()))
t=0
for i in range(n):
	for j in range(i+1,n):
		for k in range(j+1,n):
			if r[i]==r[j] or r[j]==r[k] or r[i]==r[k]:continue
			s=[r[i],r[j],r[k]]
			s.sort()
			if s[0]+s[1]>s[2]:
				t+=1
print(t)
Buggy python submission (verdict: Runtime Error):
n,d=map(int,input().split())
def f(r):return r[0]**2+r[1]**2
print(sum(f(list(map(int,input().split())))<=d**2 for _ in range(n))

Fixed submission:
n,d=map(int,input().split())
s=0
for _ in range(n):
  x,y=map(int,input().split())
  if x**2+y**2<=d**2:s+=1
print(s)

Buggy python submission (verdict: Runtime Error):
n,d=map(int,input().split())
def f(r):return r[0]**2+r[1]**2
print(sum(f(list(map(int,input().split()))) for _ in range(n))

Fixed submission:
n,d=map(int,input().split())
s=0
for _ in range(n):
  x,y=map(int,input().split())
  if x**2+y**2<=d**2:s+=1
print(s)
Buggy python submission (verdict: Runtime Error):
x=int(input())
for a in range(-100,101):
	b5=a**5-x
	if int(b**0.2)**5==b:
		print(a,int(b**0.2))
		break
		

Fixed submission:
x=int(input())
for a in range(-200,201):
	f=False
	for b in range(-201,201):
		if a**5-b**5==x:
			print(a,b)
			f=True
			break
	if f:break
Buggy python submission (verdict: Runtime Error):
s=input()
a=int(input())
r=[]
for i in range(len(s)):
  for j in range(i+1,min(k+i,len(s))+1):
    r.append(s[i:j])
r=list(set(r))
r.sort()
print(r[a-1])

Fixed submission:
s=input()
a=int(input())
r=[]
for i in range(len(s)):
  for j in range(i+1,min(a+i,len(s))+1):
    r.append(s[i:j])
r=list(set(r))
r.sort()
print(r[a-1])
Buggy python submission (verdict: Runtime Error):
N = int(input())
m,k = input().split()
result=int(m)*int(k)
print("%d"%result)
if result>=10**18:
    print("-1")





Fixed submission:
A= int(input())
B = list(map(int, input().split()))
result = 1
if 0 in B:
    print(0)
    exit()

for S in B:
    result *= S
    if result > 10**18:
        print(-1)
        exit()
print("%d"%result)

Buggy python submission (verdict: Runtime Error):
N = int(input())
m,k = input().split()
result=int(m)*int(k)
print("%d"%result)
if result>=10**18:
    print("-1")





Fixed submission:
A= int(input())
B = list(map(int, input().split()))
result = 1
if 0 in B:
    print(0)
    exit()

for S in B:
    result *= S
    if result > 10**18:
        print(-1)
        exit()
print("%d"%result)
Buggy python submission (verdict: Runtime Error):
m,k=input().split(" ")
result=int(m)*float(k)
result=int(result)
print("%d"%result//100)

Fixed submission:
m,k=input().split(" ")
m=int(m)
k=float(k)
k=int(k*100+0.5)
print(m*k//100)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    As = list(map(int, input().split()))
    mod = 10**9 + 7

    ans = 0
    for i in range(n):
        for j in range(i+1, n):
            ans += As[i] * As[j]
    ans %= mod
    print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
import numpy as np


def main():
    n = int(input())
    As = list(map(int, input().split()))
    mod = 10**9 + 7

    As_sum = np.sum(As) % mod
    ans = 0
    for i in range(n):
        As_sum -= As[i]
        As_sum %= mod
        ans += As_sum * As[i]
        ans %= mod
    ans %= mod
    print(ans)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    n = int(input())

    As = list(map(int, input().split()))
    nums = [0] * (10**5)
    ans = 0
    for a in As:
        ans += a
        nums[a] += 1

    q = int(input())
    for i in range(q):
        b, c = map(int, input().split())
        ans += (c-b) * nums[b]
        nums[c] += nums[b]
        nums[b] = 0
        print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    n = int(input())

    As = list(map(int, input().split()))
    nums = [0] * (10**5+1)
    ans = 0
    for a in As:
        ans += a
        nums[a] += 1

    q = int(input())
    for i in range(q):
        b, c = map(int, input().split())
        ans += (c-b) * nums[b]
        nums[c] += nums[b]
        nums[b] = 0
        print(ans)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    As = list(map(int, input().split()))

    ans = 1
    for i in range(n):
        ans *= As[i]
        if ans == 0:
            break

    if ans > 10**18:
        ans = -1

    print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    n = int(input())
    As = list(map(int, input().split()))

    ans = 1
    if 0 in As:
        print(0)
        exit()

    for i in range(n):
        ans *= As[i]
        if ans > 10**18:
            ans = -1
            break

    print(ans)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    a, b = list(input())
    a = int(a)
    b = float(b)
    ans = int(a*b)
    print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    a, b = input().split()
    a = int(a)
    b0 = int(b[0])*100
    b1 = int(b[2])*10
    b2 = int(b[3])
    ans = (a*b0 + a*b1 + a*b2)//100
    print(ans)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def search(rooms, li, anss, count):
    count += 1
    for l in li:
        if anss[l] == 0:
            anss[l] = count
            search(rooms, rooms[l], anss, count)
    return anss


def main():
    n, m = map(int, input().split())
    rooms = [[] for _ in range(n+1)]
    for _ in range(m):
        a, b = map(int, input().split())
        rooms[b].append(a) 
        rooms[a].append(b)
    anss = [0]*(n+1)
    li = rooms[1]
    count = 0
    anss = search(rooms, li, anss, count)
    if 0 in anss[1:]:
        print("No")
    else:
        print("Yes")
        for ans in anss[1:]:
            print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
from collections import deque


def bfs(rooms, v=1):
    arrow = [-1] * len(rooms)
    q = deque()
    q.append(v)

    while q:
        now = q.popleft()
        for next_v in rooms[now]:
            if arrow[next_v] != -1:
                continue
            else:
                q.append(next_v)
                arrow[next_v] = now
    return arrow


def main():
    n, m = map(int, input().split())
    rooms = [[] for _ in range(n+1)]
    for _ in range(m):
        a, b = map(int, input().split())
        rooms[b].append(a) 
        rooms[a].append(b)

    anss = bfs(rooms)
    print("Yes")
    for ans in anss[2:]:
        print(ans)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    As = list(map(int, input().split()))

    for i in range(n):
        ans = As.count(i+1)
        print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    n = int(input())
    As = list(map(int, input().split()))

    anss = [0]*n
    for A in As:
        anss[A-1] += 1
    for ans in anss:
        print(ans)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np


def main():
    n = int(input())
    As = np.array(list(map(int, input().split())))

    for i in range(n):
        print(np.sum(As == i+1))


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    n = int(input())
    As = list(map(int, input().split()))

    anss = [0]*n
    for A in As:
        anss[A-1] += 1
    for ans in anss:
        print(ans)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    As = list(map(int, input().split()))

    for i in range(n):
        ans = As.count(i+1)
        print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    n = int(input())
    As = list(map(int, input().split()))

    anss = [0]*n
    for A in As:
        anss[A-1] += 1
    for ans in anss:
        print(ans)


if __name__ == "__main__":
    main()