qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import sys
from collections import deque

input = sys.stdin.readline
n, u, v = map(int, input().split())

E = [[] for i in range(n)]
for i in range(n - 1):
    a, b = map(int, input().split())
    E[a-1].append(b-1)
    E[b-1].append(a-1)

memo = [[0, 0] for i in range(n)]

def dfs(cur, pre, dep, p):
    stack = deque([[cur, pre]])
    memo[cur][p] = dep
    while stack:
        cur, pre = stack.pop()
        for e in E[cur]:
            if e != pre:
                dfs(e, cur, dep + 1, p)

dfs(u - 1, - 1, 0, 0)
dfs(v - 1, -1, 0, 1)

# print(memo)
ans = 0
for a, b in memo:
    if b - a > 1:
        ans = max(ans, b - 1)
print(ans)


Fixed code:
import sys
from collections import deque

input = sys.stdin.readline
n, u, v = map(int, input().split())

E = [[] for i in range(n)]
for i in range(n - 1):
    a, b = map(int, input().split())
    E[a-1].append(b-1)
    E[b-1].append(a-1)

memo = [[0, 0] for i in range(n)]

def dfs(cur, pre, p):
    stack = deque([[cur, pre]])
    while stack:
        cur, pre = stack.pop()
        if pre != -1:
            memo[cur][p] = memo[pre][p] + 1
        for e in E[cur]:
            if e != pre:
                stack.append([e, cur])

dfs(u - 1, - 1, 0)
dfs(v - 1, -1, 1)

# print(memo)
ans = 0
for a, b in memo:
    if a <= b:
        ans = max(ans, b - 1)
print(ans)
Buggy code:
# coding: utf-8
# Your code here!
import copy
N,u,v=map(int,input().split())
l=[set()for i in range(N)]
info=[[-1,-1,-1,-1]for i in range(N)]
for i in range(N-1):
    a,b=map(int,input().split())
    l[a-1].add(b-1)
    l[b-1].add(a-1)
terminal=set()

s={u-1}
info[u-1][0]=0
info[u-1][1]=0
k=1
while len(s)>0:
    new_s=set()
    for t in s:
        for t2 in l[t]:
            if info[t2][0]==-1:
                info[t2][0]=t
                info[t2][1]=k
                new_s.add(t2)
    s=new_s
    k+=1

s={v-1}
info[v-1][2]=0
info[v-1][3]=0
k=1
while len(s)>0:
    new_s=set()
    for t in s:
        for t2 in l[t]:
            if  info[t2][2]==-1:
                info[t2][2]=t
                info[t2][3]=k
                new_s.add(t2)
    s=new_s
    k+=1
ans=-1
d=0
print(l)
print(info)
for i in range(N):
    if not len(l[i])==1:continue
    if info[i][1]<info[i][3]:
        if d<info[i][3]:
            d=info[i][3]
print(d-1)

Fixed code:
# coding: utf-8
# Your code here!
import copy
N,u,v=map(int,input().split())
l=[set()for i in range(N)]
info=[[-1,-1,-1,-1]for i in range(N)]
for i in range(N-1):
    a,b=map(int,input().split())
    l[a-1].add(b-1)
    l[b-1].add(a-1)
terminal=set()

s={u-1}
info[u-1][0]=0
info[u-1][1]=0
k=1
while len(s)>0:
    new_s=set()
    for t in s:
        for t2 in l[t]:
            if info[t2][0]==-1:
                info[t2][0]=t
                info[t2][1]=k
                new_s.add(t2)
    s=new_s
    k+=1

s={v-1}
info[v-1][2]=0
info[v-1][3]=0
k=1
while len(s)>0:
    new_s=set()
    for t in s:
        for t2 in l[t]:
            if  info[t2][2]==-1:
                info[t2][2]=t
                info[t2][3]=k
                new_s.add(t2)
    s=new_s
    k+=1
ans=-1
d=0
for i in range(N):
    if not len(l[i])==1:continue
    if info[i][1]<info[i][3]:
        if d<info[i][3]:
            d=info[i][3]
print(d-1)
Buggy code:
from collections import deque

N, u, v = map(int, input().split())
vec = [[] for _ in range(N)]
for _ in range(N - 1) :
  A, B = map(int, input().split())
  vec[A - 1].append(B - 1)
  vec[B - 1].append(A - 1)

du = [0] * N
pu = [-1] * N
q = [(u - 1, -1)]
while q :
  cur, pre = q.pop()
  for nex in vec[cur] :
    if nex != pre :
      du[nex] = du[cur] + 1
      pu[nex] = cur
      q.append((nex, cur))

dv = [0] * N
pv = [-1] * N
q = [(v - 1, -1)]
while q :
  cur, pre = q.pop()
  for nex in vec[cur] :
    if nex != pre :
      dv[nex] = dv[cur] + 1
      pv[nex] = cur
      q.append((nex, cur))

# du[u - 1] = 2
# dv[v - 1] = 2

ret = 0
for i, (u, v) in enumerate(zip(du, dv)) :
  if pu[i] == -1 or pv[i] == -1 :
    if u == 1 or v == 1 :
      ret = max(ret, 1)
    else :
      ret = max(ret, u - 1, v - 1)
  if u < v or (u == v and pu[i] != pv[i]) :
    if u == v :
      ret = max(ret, u)
    else :
      ret = max(ret, v - 1)
print(ret)

Fixed code:
from collections import deque

N, u, v = map(int, input().split())
vec = [[] for _ in range(N)]
for _ in range(N - 1) :
  A, B = map(int, input().split())
  vec[A - 1].append(B - 1)
  vec[B - 1].append(A - 1)

du = [0] * N
pu = [-1] * N
q = [(u - 1, -1)]
while q :
  cur, pre = q.pop()
  for nex in vec[cur] :
    if nex != pre :
      du[nex] = du[cur] + 1
      pu[nex] = cur
      q.append((nex, cur))

dv = [0] * N
pv = [-1] * N
q = [(v - 1, -1)]
while q :
  cur, pre = q.pop()
  for nex in vec[cur] :
    if nex != pre :
      dv[nex] = dv[cur] + 1
      pv[nex] = cur
      q.append((nex, cur))

# du[u - 1] = 2
# dv[v - 1] = 2

ret = 0
for i, (u, v) in enumerate(zip(du, dv)) :
  if u < v or (u == v and pu[i] != pv[i]) :
    if u == v :
      ret = max(ret, u)
    else :
      ret = max(ret, v - 1)
print(ret)
Buggy code:
import sys



def dfs(cur, par, g, d):
    pars[cur] = par
    for to in g[cur]:
        if to == par:
            continue
        d[to] = d[cur]+1
        md[cur] = max(md[cur], dfs(to, cur, g, d)+1)
    return md[cur]


sys.setrecursionlimit(1000000)
n, u, v = map(int, input().split())
u -= 1
v -= 1
g = []
for i in range(n):
    g.append([])
for i in range(n-1):
    a, b = map(int, input().split())
    g[a-1].append(b-1)
    g[b-1].append(a-1)
d = []
md = []
pars = []
f = []
for i in range(n):
    d.append(-1)
    md.append(0)
    pars.append(-1)
    f.append(False)
d[u] = 0
dfs(u, -1, g, d)
cur = v
while cur != u:
    f[cur] = True
    cur = pars[cur]
pars[u] = True
res = d[v]//2
for i in range(n):
    if f[i] and d[i]*2 < d[v]:
        for to in g[i]:
            if to == pars[i] or f[to]:
                continue
            res = max(res, md[to]+1+d[v]-d[i] - 1)
print(0)


Fixed code:
import sys

sys.setrecursionlimit(1000000)


def dfs(cur, par, g, d):
    pars[cur] = par
    for to in g[cur]:
        if to == par:
            continue
        d[to] = d[cur]+1
        md[cur] = max(md[cur], dfs(to, cur, g, d)+1)
    return md[cur]


n, u, v = map(int, input().split())
u -= 1
v -= 1
g = []
for i in range(n):
    g.append([])
for i in range(n-1):
    a, b = map(int, input().split())
    g[a-1].append(b-1)
    g[b-1].append(a-1)
d = []
md = []
pars = []
f = []
for i in range(n):
    d.append(-1)
    md.append(0)
    pars.append(-1)
    f.append(False)
d[u] = 0
dfs(u, -1, g, d)
cur = v
while cur != u:
    f[cur] = True
    cur = pars[cur]
f[u] = True
res = d[v]-1
for i in range(n):
    if f[i] and d[i]*2 < d[v]:
        for to in g[i]:
            if to == pars[i] or f[to]:
                continue
            res = max(res, md[to]+1+d[v]-d[i] - 1)
print(res)
Buggy code:
import sys
#input = sys.stdin.readline
from collections import deque
N, u, v = map(int, input().split())
G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
v-=1
u-=1
que = deque([v])
par = [-1]*N
depth = [-1]*N
depth[v] = 0
while que:
    i = que.popleft()
    d = depth[i]
    for nv in G[i]:
        if depth[nv]>=0:
            continue
        depth[nv] = d+1
        par[nv] = i
        que.append(nv)
d = depth[u]
now = u
m = 0
que = deque([now])
while que:
    p = que.popleft()
    if m<depth[p]:
        m = depth[p]
    for nv in G[p]:
        if depth[nv]<depth[p]:
            continue
        que.append(nv)
for i in range(d//2):
    pp = par[now]
    que = deque([p])
    while que:
        p = que.popleft()
        if m<depth[p]:
            m = depth[p]
        for nv in G[p]:
            if depth[nv]<depth[p] or nv == now:
                continue
            que.append(nv)
    now = pp
print(m-1)
    






Fixed code:
import sys
#input = sys.stdin.readline
from collections import deque
N, u, v = map(int, input().split())
G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
v-=1
u-=1
que = deque([v])
par = [-1]*N
depth = [-1]*N
depth[v] = 0
while que:
    i = que.popleft()
    d = depth[i]
    for nv in G[i]:
        if depth[nv]>=0:
            continue
        depth[nv] = d+1
        par[nv] = i
        que.append(nv)
d = depth[u]
now = u
m = 0
que = deque([now])
while que:
    i = que.pop()
    m = max(m, depth[i])
    for nv in G[i]:
        if depth[nv]<depth[i]:
            continue
        que.append(nv)
for i in range(d//2):
    pp = par[now]
    que = deque([pp])
    while que:
        i = que.pop()
        m = max(m, depth[i])
        for nv in G[i]:
            if depth[nv]<depth[i] or nv == now:
                continue
            que.append(nv)
    now = pp
print(m-1)
Buggy code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.readline
INF = 10**9

n, u, v = [int(item) for item in input().split()]
u -= 1; v -= 1
edge = [[] for _ in range(n)]

for i in range(n-1):
    a, b = [int(item) for item in input().split()]
    a -= 1; b -= 1
    edge[a].append(b)
    edge[b].append(a)

depth = [0] * n
def calc_depth(p, v, d):
    depth[v] = d
    for nv in edge[v]:
        if nv == p:
            continue
        calc_depth(v, nv, d+1)

calc_depth(-1, v, 0)
frm = depth[v]
too = depth[u]
up = (too - frm - 1) // 2
max_depth = too 

def dfs(p, v, lim):
    global max_depth
    max_depth = max(max_depth, depth[v])
    for nv in edge[v]:
        if nv == p:
            continue
        if depth[v] < lim:
            continue
        dfs(v, nv, lim)

dfs(-1, u, too - up)

if too == 1 and max_depth == 1:
    print(-1)
    exit()
if too == 2 and max_depth == 2:
    print(1)
    exit()

ans = 0
ans = max_depth - frm - 1
print(ans)

Fixed code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.readline
INF = 10**9

n, u, v = [int(item) for item in input().split()]
u -= 1; v -= 1
edge = [[] for _ in range(n)]

for i in range(n-1):
    a, b = [int(item) for item in input().split()]
    a -= 1; b -= 1
    edge[a].append(b)
    edge[b].append(a)

depth = [0] * n
def calc_depth(p, v, d):
    depth[v] = d
    for nv in edge[v]:
        if nv == p:
            continue
        calc_depth(v, nv, d+1)

calc_depth(-1, v, 0)
frm = depth[v]
too = depth[u]
up = (too - frm - 1) // 2
max_depth = too 

def dfs(p, v, lim):
    global max_depth
    max_depth = max(max_depth, depth[v])
    for nv in edge[v]:
        if nv == p:
            continue
        if depth[v] < lim:
            continue
        dfs(v, nv, lim)
dfs(-1, u, too - up)
if too == 1 and max_depth == 1:
    print(0)
    exit()
if too == 2 and max_depth == 2:
    print(1)
    exit()

ans = 0
ans = max_depth - frm - 1
print(ans)
Buggy code:
import sys
input=sys.stdin.readline
n,u,v=map(int,input().split())
Edge=[[] for i in range(n)]
for i in range(n-1):
  a,b=map(int,input().split())
  Edge[a-1].append(b-1)
  Edge[b-1].append(a-1)


from collections import deque

def BFS(s):
  dist=[-1]*n
  que=deque([s-1])
  dist[s-1]=0
  while que:
    v=que.popleft()
    d=dist[v]
    for w in Edge[v]:
      if dist[w]>-1:
        continue
      dist[w]=d+1
      que.append(w)
  return dist

U_d,V_d=BFS(u),BFS(v)
ans=0
for i in range(n):
  if U_d[i]<V_d[i]:
    ans=max(ans,U_d[i])
print(ans)


Fixed code:
import sys
input=sys.stdin.readline
n,u,v=map(int,input().split())
Edge=[[] for i in range(n)]
for i in range(n-1):
  a,b=map(int,input().split())
  Edge[a-1].append(b-1)
  Edge[b-1].append(a-1)


from collections import deque

def BFS(s):
  dist=[-1]*n
  que=deque([s-1])
  dist[s-1]=0
  while que:
    v=que.popleft()
    d=dist[v]
    for w in Edge[v]:
      if dist[w]>-1:
        continue
      dist[w]=d+1
      que.append(w)
  return dist

U_d,V_d=BFS(u),BFS(v)
ans=0
for i in range(n):
  if U_d[i]<V_d[i]:
    ans=max(ans,V_d[i]-1)
print(ans)
Buggy code:
A1, A2, A3 = map(int, split(input()))
total = A1 + A2 + A3
if total >= 22:
    print("bust")
else:
    print("win")

Fixed code:
A1, A2, A3 = map(int, input().split())
total = A1 + A2 + A3
if total >= 22:
    print("bust")
else:
    print("win")
Buggy code:
a,b,c=map(int,input())
t=a+b+c
if t<=21:
  print('win')
else:
  print('bust')

Fixed code:
a,b,c=map(int,input().split())
t=a+b+c
if t<=21:
  print('win')
else:
  print('bust')
Buggy code:
L,M,N = map(int,input().split())
print("win" if L+M+N >= 22 else "bust")

Fixed code:
L,M,N = map(int,input().split())
print("bust" if L+M+N >= 22 else "win")
Buggy code:
#y,m,d=map(int,input().split())
#a,b=map(int,input().split())
#n=int(input())
#a=int(input())
#b=int(input())
#s=list(input())
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#b=list(map(int,input().split()))
#b=list(map(int,input().split()))
#a=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#a=[list(input().split())for _ in range(n)]
#a=[int(input())for _ in range(n)]
a=list(map(int,input().split(())))
total=sum(a)
if 22<=total:
    print('bust')
else:
    print('win')

Fixed code:
#y,m,d=map(int,input().split())
#a,b=map(int,input().split())
#n=int(input())
#a=int(input())
#b=int(input())
#s=list(input())
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#b=list(map(int,input().split()))
#b=list(map(int,input().split()))
#a=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#a=[list(input().split())for _ in range(n)]
#a=[int(input())for _ in range(n)]
a=list(map(int,input().split()))
total=sum(a)
if 22<=total:
    print('bust')
else:
    print('win')
Buggy code:
a1,a2,a3 = input().split()
if(a1+a2+a3<22):
 print("win")
else:
 print("bust")


Fixed code:
a1,a2,a3 = map(int,input().split())
if(a1+a2+a3<22):
 print("win")
else:
 print("bust")
Buggy code:
a = input().split(" ")
if((int(a[0])+int(a[1])+int(a[2]))>22):
    print("bust")
else:
    print("win")


Fixed code:
a = input().split(" ")
if((int(a[0])+int(a[1])+int(a[2]))>21):
    print("bust")
else:
    print("win")
Buggy code:
A, B, C = map(int, input().split())

S = A + B + C 

if S <= 21:
  print("bust")
else:
  print("win")


Fixed code:
A, B, C = map(int, input().split())

S = A + B + C 

if S <= 21:
  print("win")
else:
  print("bust")
Buggy code:
a,b,c = map(int,input().split())
if a + b + c >22:
  print('bust')
else:
  print('win')

Fixed code:
a,b,c = map(int,input().split())

ans = a+b+c
if ans >= 22:
    print('bust')
else:
    print('win')
Buggy code:
a,b,c=map(int,input().split())
if a+b+c>=22:
  print('win')
else:
  print('bust')

Fixed code:
a, b, c = map(int,input().split())
if a + b + c >= 22:
    print("bust") 
else:
    print("win")
Buggy code:
A = list(map(int, input().split()))
sum_A = sum(A)
if sum_A < 21:
  print("win")
else:
  print("bust")

Fixed code:
A = list(map(int, input().split()))
sum_A = sum(A)
if sum_A <= 21:
  print("win")
else:
  print("bust")
Buggy code:
a,b,c = map(int,input().split())
d = a+b+c
if d <=22:
    print('bust')
else:
    print('win')

Fixed code:
a,b,c = map(int,input().split())
d = a+b+c
if d >=22:
    print('bust')
else:
    print('win')
Buggy code:
A,B,C = list(map(int, input().split()))
if sum(A,B,C) >= 22:
    print("bust")
else:
    print("win ")

Fixed code:
A = list(map(int, input().split()))
if sum(A) >= 22:
    print("bust")
else:
    print("win ")
Buggy code:
print("bust" if sum(map(int, input().strip().split()) >= 22 else "win")

Fixed code:
print("bust" if sum(map(int, input().strip().split())) >= 22 else "win")
Buggy code:
N = input().split()
print(N)

sum = 0
for i in range(len(N)):
  sum += int(N[i])
  
if sum >= 22:
  print('bust')
else:
  print('win')

Fixed code:
N = input().split()

sum = 0
for i in range(len(N)):
  sum += int(N[i])
  
if sum >= 22:
  print('bust')
else:
  print('win')
Buggy code:
a,b,c=map(int(input().split()))
if a+b+c>=22:
  print("bust")
else:
  print("win")

Fixed code:
a,b,c=map(int,input().split())

n=a+b+c

if n>=22:
  print("bust")
else:
  print("win")
Buggy code:
print("bust" if sum(map(int,input().split()))>21 else "win")
print("test")

Fixed code:
print("bust" if sum(map(int,input().split()))>21 else "win")
Buggy code:
A1,A2,A3=map(int,input.split())
if A1+A2+A3>=22:
  print('bust')
else:
  print('win')

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

if A1+A2+A3 >= 22:
    print('bust')
else:
    print('win')
Buggy code:
a1, a2, a3 = map(int, input().split(' '))
    if (a1 + a2 + a3) >=22:
        print("bust")
    else:
        print("win")

Fixed code:

if __name__ == '__main__':
    a1, a2, a3 = map(int, input().split(' '))
    if (a1 + a2 + a3) >=22:
        print("bust")
    else:
        print("win")
Buggy code:
a, b, c = (int(i) for i in input().split())
sum = a + b + c
if sum < 21:
    print('win')
else:
    print('bust')

Fixed code:
a, b, c = (int(i) for i in input().split())
sum = a + b + c
if sum <= 21:
    print('win')
else:
    print('bust')
Buggy code:
a,b,c = map(int,input().split())
print ("win" if a+b+c < 21 else "bust")

Fixed code:
a,b,c = map(int,input().split())
sum = a+b+c
if(sum<=21):
    print("win")
else:
    print("bust")
Buggy code:
a,b,c=map(int,input().split(' '))
if sum(a.b.c) >=22:
    print('bust')
else:
    print('win')

Fixed code:
a,b,c=map(int,input().split())
if a+b+c>=22:
  print('bust')
else:
  print('win')
Buggy code:
a_n = list(map(int, input().split()))

if sum(a_n) >= 22:
    print("win")
else:
    print("bust")


Fixed code:
a_n = list(map(int, input().split()))

if sum(a_n) >= 22:
    print("bust")
else:
    print("win")
Buggy code:

value = map(int, input().strip().split())

def sumValue(values):
  sum_value = 0
  for value in values:
    sum_value = sum_value + value
  return sum_value


if sumVlaue(value) == 22:
  print("bust")
else:
  print("win")

Fixed code:
value = map(int,input().strip().split())

def sumValue(values):
	sum_value = 0
	for value in values:
		sum_value = sum_value + value
	return sum_value

if sumValue(value) >= 22:
	print("bust")
else:
	print("win")
Buggy code:
a = sum(map(int, input().split(' ',2)))
print(a)
if a >= 22:
    print('win')
else:
    print('bust') 

Fixed code:
a=list(map(int,input().split(' ')))
if sum(a) >=22:
    print('bust')
else:
    print('win')
Buggy code:
# coding: utf-8
a = list(map(int, input().split()))
if sum(a) > 21:
    print("bust")
else:
    print(win)

Fixed code:
# coding: utf-8
a = list(map(int, input().split()))
if sum(a) > 21:
    print("bust")
else:
    print("win")
Buggy code:
A, B, C = map(int, input().split())
if A + B + C > 21:
    print("bust")
else
    print("win")

Fixed code:
A, B, C = map(int, input().split())
if A + B + C > 21:
    print("bust")
else:
    print("win")
Buggy code:
S = input().split(" ")
sum = 0
for i in S:
  sum = sum + i
if(sum >21):
  print("bust")
else:
  print("win")

Fixed code:
S = input().split(" ")
sum = 0
for i in S:
  sum = sum + int(i)
if(sum >21):
  print("bust")
else:
  print("win")
Buggy code:
a = list(map( int, input().split() ))

if sum(a) > 22:
  print("bust")
else:
  print("win")

Fixed code:
a=list(map(int,input().split()))
print('bust' if sum(a)>=22 else 'win')
Buggy code:
*A, = map(int, input().split())
print("bust" if sum(a)>=22 else "win")

Fixed code:
*A, = map(int, input().split())
print("bust" if sum(A)>=22 else "win")
Buggy code:
a = list(map(int, input().split()))

if sum(a) > 21:
    print('win')
else:
    print('bust')

Fixed code:
a = map(int, input().split())
a = list(a)

if sum(a) >= 22:
    print("bust")
else:
    print("win")
Buggy code:
def main():
    a, b, c = list(map(int, input().split()))
    ret = 'bust' if sum(a,b,c) >= 22 else 'win'
    print(ret)

if __name__ == "__main__":
    main()


Fixed code:
def main():
    a = list(map(int, input().split()))
    ret = 'bust' if sum(a) >= 22 else 'win'
    print(ret)

if __name__ == "__main__":
    main()
Buggy code:
A = list(map(int, input().split()))
print('bust' if sum(a) >= 22 else 'win')

Fixed code:
a = list(map(int, input().split()))
print('bust' if sum(a) >= 22 else 'win')
Buggy code:
a,b,c = mac(int,input().split())

if a+b+c > 21:
    print('bust')
else:
    print('win')

Fixed code:
a, b, c = map(int,input().split())

if a+b+c > 21:
  print('bust')
else:
  print('win')
Buggy code:
A = list(map(int, input().split()))

SUM_A = sum(A)

if SUM_A <= 21:
    pritn("win") 
else:
    print("bust")

Fixed code:
A = list(map(int, input().split()))

SUM_A = sum(A)

if SUM_A <= 21:
    print("win") 
else:
    print("bust")
Buggy code:
a=sum(map(int,input().split()))
if a<=21:
    print("win")
else:
    print("burst")
    

Fixed code:
a=sum(map(int,input().split()))
if a<=21:
    print("win")
else:
    print("bust")
Buggy code:
a, b, c = map(int, input().split())
ig a + b + c >= 22:
  print("bust")
else:
  print("win")

Fixed code:
a,b,c= map(int,input().split())
if a+b+c>=22:
    print("bust")
else:
    print("win")
Buggy code:
a,b,c=map(int,input().split())
if a+b+c >= 22:
   print("bust")
    else:
      print("win")

Fixed code:
a,b,c=map(int,input().split())
print("bust" if a+b+c>=22 else "win")
Buggy code:
from sys import stdin, stdout

def print(x):
    stdout.write(str(x))

def solve():
    A = [int(x) for x in stdin.readline().split()]
    sum = 0
    for a in A:
        sum += a
    if sum <= 22 :
        print("win")
    else:
        print("bust")

def main():
    solve()


if __name__ == "__main__":
    main()

Fixed code:
from sys import stdin, stdout

def print(x):
    stdout.write(str(x))

def solve():
    A = [int(x) for x in stdin.readline().split()]
    sum = 0
    for a in A:
        sum += a
    if sum < 22 :
        print("win")
    else:
        print("bust")

def main():
    solve()


if __name__ == "__main__":
    main()
Buggy code:
a, b, c = map(int, input().split())
sum = a + b + c
if sum < 22:
    print('win')
else:
    print('burst')

Fixed code:
a, b, c = map(int, input().split())
sum = a + b + c
if sum < 22:
    print('win')
else:
    print('bust')
Buggy code:
a,b,c =map(int,input().split())
if a+b+c>=21:
  print("win")
else:
  print("bust")

Fixed code:
a, b, c = map(int,input().split())

ans = int(0)

ans = a+b+c

if ans > 21:
    print("bust")

else:
    print("win")
Buggy code:
As = list(map(int, input().split()))

print("bust" if sum(As) >22 else "win")

Fixed code:
As = list(map(int, input().split()))

print("bust" if sum(As) >= 22 else "win")
Buggy code:
A=list(map(int,input()split()))
B=0
B=A[0]+A[1]+A[2]
if B>=22:
    print("bust")
else:
    print("win")

Fixed code:
A=list(map(int,input().split()))
B=0
B=A[0]+A[1]+A[2]
if B>=22:
    print("bust")
else:
    print("win")
Buggy code:
a1, a2, a3 = map(int, input().split())
if a1+a2+a3 >= 22:
  print("bust")
elif a1+a2+a3 < 21:
  print("win")

Fixed code:
a1, a2, a3 = map(int, input().split())
if a1+a2+a3 >= 22:
  print("bust")
elif a1+a2+a3 <= 21:
  print("win")
Buggy code:
a,b,c = map(int(),input().split())
sum = a+b+c

if sum >= 22:
    print('bust')
else:
    print('win')


Fixed code:
a,b,c = map(int,input().split())
sum = a+b+c

if sum >= 22:
    print('bust')
else:
    print('win')
Buggy code:
x=list(map(int, input().split()))
if x[2]+x[1]+x[0]>21:
	print('bust')
else:
	print('Win')

Fixed code:
x=list(map(int, input().split()))
if x[2]+x[1]+x[0]>21:
	print('bust')
else:
	print('win')
Buggy code:
p = list(map(int, input().split()))
if sum(p) >= 22:
    print('bust')
else:
    print('Win')


Fixed code:
p = list(map(int, input().split()))
if sum(p) >= 22:
    print('bust')
else:
    print('win')
Buggy code:
ef main():
    a1, a2, a3 = map(int, input().split())
    if (a1+a2+a3) <= 21:
        print("win")
    else:
        print("bust")

if __name__ == "__main__":
    main()

Fixed code:
def main():
    a1, a2, a3 = map(int, input().split())
    if (a1+a2+a3) <= 21:
        print("win")
    else:
        print("bust")

if __name__ == "__main__":
    main()
Buggy code:
a,b,c = list(map(int,input().split()))

if a + b + c <= 21:
    print("win")

else:
    print("bust")12 

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

if a + b + c <= 21:
    print("win")

else:
    print("bust")