qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a.b=map(int,input().split())
if a==1:
    if b==1:
        print('Draw')
    else:
        print('Alice')
else:
    if b==1:
        print('Bob')
    else:
        if a>b:
            print('Alice')
        elif a==b:
            print('Draw')
        else:
            print('Bob')

Fixed code:
a,b=map(int,input().split())
if a==1:
    if b==1:
        print('Draw')
    else:
        print('Alice')
else:
    if b==1:
        print('Bob')
    else:
        if a>b:
            print('Alice')
        elif a==b:
            print('Draw')
        else:
            print('Bob')
Buggy code:
    a,b = map(int,input().split())
    if a != 1 and b != 1:
        if a > b :
            print("Alice")
        elif a < b:
            print("Bob")
        else:
            print("Draw")
    elif a == 1 and b != 1:
        print("Alice")
    elif a != 1 and b == 1:
        print("Bob")
    else:
        print("Draw")

Fixed code:
a,b = map(int,input().split())
if a != 1 and b != 1:
  if a > b :
   	  print("Alice")
  elif a < b:
      print("Bob")
  else:
      print("Draw")
elif a == 1 and b != 1:
      print("Alice")
elif a != 1 and b == 1:
      print("Bob")
else:
      print("Draw")
Buggy code:
a, b = map(int, input().split())

if a == 1 or b == 1:
    if a < b:
        print("Alice")
    elif b < a:
        print("Bob")
if a < b:
    print("Bob")
elif b < a:
    print("Alice")
if a == b:
    print("Draw")

Fixed code:
a,b = map(int,input().split())
if a == b:
    print("Draw")
elif a == 1:
    print("Alice")
elif b == 1:
    print("Bob")
elif a<b:
    print("Bob")
else:
    print("Alice")
Buggy code:
A, B= map(int, input().split())

if A==1:
    A = 14

if B==1:
    B=14

if A > B:
    print("Alice")
elif B < A:
    print("Bob")
else :
    print("Draw")

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

if A==1:
    A = 14

if B==1:
    B = 14

if A > B:
    print("Alice")
elif B > A:
    print("Bob")
else :
    print("Draw")
Buggy code:

def main():
    a, b = map(int, input().split())
    if a > b:
        print('Alice')
    elif a < b:

        print('Bob')
    else:
        print('Draw')



if __name__ == '__main__':
    main()


Fixed code:

def main():
    a, b = map(int, input().split())
    if a == 1:
        a = 14
    if b == 1:
        b = 14
    if a > b:
        print('Alice')
    elif a < b:

        print('Bob')
    else:
        print('Draw')



if __name__ == '__main__':
    main()
Buggy code:
A, B = map( int, input().split() )
if A > B :
   print( "Alice" )
elif A < B :
   print( "Bob" )
else : 
   print( "Draw" )

Fixed code:
A,B = map(int,input().split())
if (A == 1):
  if (B == 1):
    print('Draw')
  else:
    print('Alice')
else:
  if (B == 1):
    print('Bob')
  elif (A == B):
    print('Draw')
  elif (A > B):
    print('Alice')
  else:
    print('Bob')
Buggy code:
a_str, b_str = input().split()
a = int(a_str)
b = int(b_str)

def change(i):
    if i==1:
        i=14

change(a)
change(b)

if a>b:
    print('Alice')
elif b>a:
    print('Bob')
else:
    print('Draw')



Fixed code:
a_str, b_str = input().split()

a = int(a_str)
b = int(b_str)


def change(i):
    if i == 1:
        return 14
    else:
        return i


a = change(a)
b = change(b)
if a > b:
    print('Alice')
elif b > a:
    print('Bob')
else:
    print('Draw')
Buggy code:
a,b=map(int, input().split())
a=(a+11)%12
b=(a+11)%12
print("Alice" if a>b else  "Bob" if a<b else "Draw" )

Fixed code:
a,b=map(int, input().split())
a=(a+11)%13
b=(b+11)%13
print("Alice" if a>b else  "Bob" if a<b else "Draw" )
Buggy code:
a,b = map(int,input().split())
if a==b:
  print('Draw')
elif a==1:
  print('Alice')
elif b==1 or :
  print('Bob')
elif a>b:
  print('Alice')
else:
  print('Bob')

Fixed code:
a, b = map(int, input().split())
if a == 1:
  a = 14
if b == 1:
  b = 14

if a > b:
  print("Alice")
elif a == b:
  print("Draw")
else:
  print("Bob")
Buggy code:
a,b=map(int,input().split())
print('Alice' if a==1 and b!=1 or a>b and b!=1
      else 'Bob' if b==1 and a!=1 or b>a and a!=1
      else 'Drow')


Fixed code:
a,b=map(int,input().split())
print('Alice' if (a==1 or a>b) and b!=1 else 'Draw' if a==b else 'Bob')
Buggy code:
a, b = int(input().split())

if a == 1: a = 14
if b == 1: b = 14

if a < b:
    print('Bob')
elif b < a:
    print('Alice')
else:
    print('Draw')

Fixed code:
a, b = map(int,input().split())
if a == 1:
  a = 14
if b == 1:
  b = 14
  
if a>b:
  print('Alice')
elif a<b:
  print('Bob')
else:
  print('Draw')
Buggy code:
A, B = map(int, input().split())
if A == B:
    print('Draw')
elif A == 1:
    print('Alice')
elif A > B:
    print('Alice')
else:
    print('Bob')

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

if A==B:
    print("Draw")
elif A == 1:
    print("Alice")
elif B == 1:
    print("Bob")
elif A > B:
    print("Alice")
else:
    print("Bob")
Buggy code:
alice, bob = map(int, input().split())
if alice == 1:
  print("Alice")
elif bob == 1 or bob > alice:
  print("Bob")
elif alice == bob:
  print("Draw")
else:
  print("Alice")

Fixed code:
alice, bob = map(int, input().split())
if alice == bob:
  print("Draw")
elif alice == 1:
  print("Alice")
elif bob == 1 or bob > alice:
  print("Bob")
else:
  print("Alice")
Buggy code:
a,b=map(int,input().split())
if a==b:
  print("draw")
elif a>b and b!=1 or a==1:
  print("Alice")
elif a<b or b==1:
  print("Bob")


Fixed code:
a,b=map(int,input().split())
if a==b:
  print("Draw")
elif a>b and b!=1 or a==1:
  print("Alice")
elif a<b or b==1:
  print("Bob")
Buggy code:
A,B=map(int,input().split())
if A>B or (A=="1" and B!="1"):
  print("Alice")
elif A<B or( B=="1" and A!="1"):
  print("Bob")
elif A==B:
  print("Draw")

Fixed code:
A,B=map(int,input().split())
if (B==1 and A!=1) or(A!=1 and B>A):
  print("Bob")
elif (A==1 and B!=1) or B<A:
  print("Alice")
elif A==B:
  print("Draw")
Buggy code:
A, B = map(int, input().split())
A = 13 if A == 1 else A
B = 13 if B == 1 else B
if A > B:
    print("Alice")
elif A == B:
    print("Draw")
else:
    print("Bob")


Fixed code:
A, B = map(int, input().split())
if A == 1:
  A = 14
if B == 1:
  B = 14
if A > B:
  print('Alice')
elif A == B:
  print('Draw')
else:
  print('Bob')
Buggy code:
a, b = map(int, input().split())
if a == b:
    print('Draw')
elif a > b or a == 1:
    print('Alice')
else:
    print('Bob')


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

if a == b:
    print("Draw")
elif a==1:
    print("Alice")
elif b==1:
    print("Bob")
elif a>b:
    print("Alice")
else:
    print("Bob")
Buggy code:
A, B = list(map(int, input().split()))
if A > B:
    print("Alice")
elif A == B:
    print("Draw")
else:
    print("Bob")

Fixed code:
A, B = list(map(int, input().split()))
if A == 1:
    A = 14
if B == 1:
    B = 14
if A > B:
    print("Alice")
elif A == B:
    print("Draw")
else:
    print("Bob")
Buggy code:
# -*- coding: utf-8 -*-
# N = int(input())
A,B = map(int,input().split())

if A == 1:
    print('Alice')
elif B == 1:
    print('Bob')
else:
    if A > B:
        print('Alice')
    elif A == B:
        print('Draw')
    else:
        print('Bob')


Fixed code:
# -*- coding: utf-8 -*-
# N = int(input())
A,B = map(int,input().split())

if A == B:
    print('Draw')
else:
    if A == 1:
        print('Alice')
    elif B == 1:
        print('Bob')
    else:
        if A > B:
            print('Alice')
        else:
            print('Bob')
Buggy code:
a, b = map(int, input().split())
if a > b:
    print ("Alice")
elif a < b:
    print ("Bob")
else:
    print ("Draw")

Fixed code:
a, b = map(int, input().split())
if a == 1:
    a = 14
if b == 1:
    b = 14
    
if a > b:
    print ("Alice")
elif a < b:
    print ("Bob")
else:
    print ("Draw")
Buggy code:
A, B = map(int, input().split())
A = (A + 12) % 13
B = (B + 12) % 13
print('Alice' if A > B else ('Bob' if B > A else 'Draw'))

Fixed code:
A, B = map(int, input().split())
A = (A + 11) % 13
B = (B + 11) % 13
print('Alice' if A > B else ('Bob' if B > A else 'Draw'))
Buggy code:
A, B = map(int, input().split())
if A == 1:
    A += 13
if B == 1:
    B += 13
win_Alice = A - B
if win_Alice = 0:
    print('Draw')
else:
    print('Alice' if win_Alice > 0 else 'Bob')

Fixed code:
A, B = map(int, input().split())
if A == 1:
    A += 13
if B == 1:
    B += 13
win_Alice = A - B
if win_Alice == 0:
    print('Draw')
else:
    print('Alice' if win_Alice > 0 else 'Bob')
Buggy code:
a,b = map(int,input().split())
if a == b:
  print("draw")
elif a == 1:
  print("Alice")
elif b == 1:
  print("Bob")
elif a > b:
  print("Alice")
else:
  print("Bob")

Fixed code:
a,b = map(int,input().split())
if a == b:
  print("Draw")
elif a == 1:
  print("Alice")
elif b == 1:
  print("Bob")
elif a > b:
  print("Alice")
else:
  print("Bob")
Buggy code:
A, B = map(int, input().split())

if A<B and A!=1:
  print('Bob')
elif A>B and B!=1:
  print('Alice')
else:
  print('Draw')

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

if (A<B and A!=1) or (A!=B and B==1):
  print('Bob')
elif (A>B and B!=1) or (A!=B and A==1):
  print('Alice')
else:
  print('Draw')
Buggy code:
a,b = map(int(input().split()))

a = 14 if a == 1 else a
b = 14 if b == 1 else b

if a > b:
    print("Alice")
elif a < b:
    print("Bob")
else:
    print("Draw")

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

if a==1:
    a=14
if b==1:
    b=14
if a>b:
    print('Alice')
elif a<b:
    print('Bob')
else:
    print('Draw')
Buggy code:
a,b=map(int,input().split())
if a==1 and b!= 1:
    a += 13
    if a>b:
     print('Alice')
    elif b>a:
     print('Bob')
    else:
     print('Draw')
elif b==1 and a!= 1:
    a += 13
    if a>b:
     print('Alice')
    elif b>a:
     print('Bob')
    else:
     print('Draw')
elif a==1 and b== 1:
     print('Draw')
else:
    if a>b:
     print('Alice')
    elif b>a:
     print('Bob')
    else:
     print('Draw')

Fixed code:
a,b=map(int,input().split())
if a==1 and b!= 1:
    a += 13
    if a>b:
     print('Alice')
    elif b>a:
     print('Bob')
    else:
     print('Draw')
elif b==1 and a!= 1:
    b += 13
    if a>b:
     print('Alice')
    elif b>a:
     print('Bob')
    else:
     print('Draw')
elif a==1 and b== 1:
     print('Draw')
else:
    if a>b:
     print('Alice')
    elif b>a:
     print('Bob')
    else:
     print('Draw')
Buggy code:
a, b = map(int, input().split())
print('Draw' if a==b else 'Alice' if (a==1)or(b!=1 and a>b)) else 'Bob')

Fixed code:
a, b = map(int, input().split())
print('Draw' if a==b else 'Alice' if (a==1)or(b!=1 and a>b) else 'Bob')
Buggy code:
a,b=map(int,input().split())
if a>b:
    print('Alice')
elif b>a:
    print('Bob')
else:
    print('Draw')

Fixed code:
a, b = map(int, input().split())
if a == b: print('Draw')
elif a == 1: print('Alice')
elif b == 1: print('Bob')
elif a > b: print('Alice')
else: print('Bob')
Buggy code:
cards = input().split()
alice = int(cards[0])
bob = int(cards[1])

if alice == bob:
    print("Draw")
if alice == 1:
    print("Alice")
if bob == 1:
    print("Bob")
if alice < bob:
    print("Bob")
else :
    print("Alice")

Fixed code:
cards = input().split()
alice = int(cards[0])
bob = int(cards[1])

if alice == bob:
    print("Draw")
elif alice == 1:
    print("Alice")
elif bob == 1:
    print("Bob")
elif alice < bob:
    print("Bob")
else :
    print("Alice")
Buggy code:
a, b = map(int, input().split())

if a == b:
  print("Draw")
elif a > b:
  print("Alice")
else:
  print("Bob")

Fixed code:
a,b = map(int, input().split())
if a == b:
  print("Draw")
else:
  if a == 1:
    print("Alice")
  else:
    if b == 1:
      print("Bob")
    else:
      if a > b:
        print("Alice")
      else:
        print("Bob")
Buggy code:
A, B = map(int(input().split()))
if A == B:
  print('Draw')
elif A == 1:
  print('Alice')
elif B == 1:
  print('Bob')
elif A > B:
  print('Alice')
else:
  print('Bob')

Fixed code:
A, B = map(int, input().split())
if A == B:
  print('Draw')
elif A == 1:
  print('Alice')
elif B == 1:
  print('Bob')
elif A > B:
  print('Alice')
else:
  print('Bob')
Buggy code:
a,b = (int(x) for in input.split())

if a==1:
    a=14
if b==1:
    b=14

if a>b:
    print("Alice")
elif a<b:
    print("Bob")
else:
    print("Draw")

Fixed code:
a,b = (int(x) for x in input().split())

if a==1:
    a=14
if b==1:
    b=14

if a>b:
    print("Alice")
elif a<b:
    print("Bob")
else:
    print("Draw")
Buggy code:
a,b = map(int,input().split())
if a==1:
    a=14
elif b==1:
    b=14

if a==b:
    print('Draw')
elif(a>b):
    print('Alice')
else:
    print('Bob')

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

if a == 1 and b == 1:
    print('Draw')
elif a == 1:
    print('Alice')
elif b == 1:
    print('Bob')

elif a == b:
    print('Draw')
elif a > b:
    print('Alice')
else:
    print('Bob')
Buggy code:
A, B = map(int, input().split())
if A == B:
	print('Draw)
elif A == 1:
	pirnt('Alice')
elif B == 1:
	print('Bob')
elif A > B:
	print('Alice')
else:
	print('Bob')          

Fixed code:
A, B = map(int, input().split())
if A == B:
	print('Draw')
elif A == 1:
	print('Alice')
elif B == 1:
	print('Bob')
elif A > B:
	print('Alice')
else:
	print('Bob')
Buggy code:
a, b = map(int, input().split())
if a == 1:
    a = 14
if b == 1:
    b == 14
if a > b:
    print('Alice')
elif a < b:
    print('Bob')
elif a == b:
    print('Draw')

Fixed code:
a,b=map(int,input().split())
if a==1:
    if a==b:
        print("Draw")
    else:
        print("Alice")
elif b==1:
    if a==b:
        print("Draw")
    else:
        print("Bob")
else:
    if a<b:
        print("Bob")
    elif a>b:
        print("Alice")
    else:
        print("Draw")
Buggy code:
a, b = map(int, input().split())
if a == 1:
    a = 14
if b == 1:
    b == 14
if a > b:
    print('Alice')
elif a < b:
    print('Bob')
elif a == b:
    print('Drow')

Fixed code:
a, b = map(int, input().split())
if a == 1:
    a = 14
if b == 1:
    b = 14
if a > b:
    print('Alice')
elif a < b:
    print('Bob')
elif a == b:
    print('Draw')
Buggy code:
card = list(map(int, input().split()))

if card[0] > card[1]:
    print('Alice')
elif card[0] < card[1]:
    print('Bob')
else:
    print('Draw')


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

if card[0] > card[1]:
    if card[1] == 1:
        print('Bob')
    else:
        print('Alice')
elif card[0] < card[1]:
    if card[0] == 1:
        print('Alice')
    else:
        print('Bob')
else:
    print('Draw')
Buggy code:
a,b = map(int,input().split())
if a==1:
    a = 14
if b==1:
    b = 14
if a==b:
    print("draw")
elif a>b:
    print("Alice")
else:
    print("Bob")

Fixed code:
a,b = map(int,input().split())
if a==1:
    a = 14
if b==1:
    b = 14
if a==b:
    print("Draw")
elif a>b:
    print("Alice")
else:
    print("Bob")
Buggy code:
""" AtCoder """

A, B = map(int, input().split())

if A == 1:
    A = 14
if B == 1:
    B = 14:

if A > B:
    print("Alice")
elif A == B:
    print("Draw")
else:
    print("Bob")


Fixed code:
""" AtCoder """

A, B = map(int, input().split())

if A == 1:
    A = 14
if B == 1:
    B = 14

if A > B:
    print("Alice")
elif A == B:
    print("Draw")
else:
    print("Bob")
Buggy code:
a, b = map(int, input().split())
if a == 1:
    a = 14
if b == 1:
    b == 14
if a > b:
    print('Alice')
elif a < b:
    print('Bob')
else:
    print('Drow')

Fixed code:
a,b=map(int,input().split())
if a==1:
    a=14
if b==1:
    b=14
if a<b:
    print("Bob")
elif a>b:
    print("Alice")
else:
    print("Draw")
Buggy code:
a = input("")
a_num = a.index("A")
for i in range(len(a)-1,-1,-1):
    if a[i]=="Z":
        z_num = i+1
        break
print(i)

Fixed code:
a = input("")
a_num = a.index("A")
for i in range(len(a)-1,-1,-1):
    if a[i]=="Z":
        z_num = i+1
        break
print(len(a[a_num:z_num]))
Buggy code:
s = input()
n = len(s)

x = []

for i in range(n):
    if 'A' not in x and s[i] is 'A':
        x.append(i)
        x.append('A')
    elif 'A' in x and s[i] is 'Z':
        x.append(i)

print(x)
print(x[-1] - x[0] + 1)


Fixed code:
s = input()
n = len(s)

x = []

for i in range(n):
    if 'A' not in x and s[i] is 'A':
        x.append(i)
        x.append('A')
    elif 'A' in x and s[i] is 'Z':
        x.append(i)

print(x[-1] - x[0] + 1)
Buggy code:
S = list(input())
num = 0
num2 = 0
for i in range(len(S)):
    if S[i] == "A":
        num = i
        break
for i in range(len(S)):
    if S[i] == "Z":
        num2 = i
        
print(num2 - num)


Fixed code:
S = list(input())
num = 0
num2 = 0
for i in range(len(S)):
    if S[i] == "A":
        num = i
        break
for i in range(len(S)):
    if S[i] == "Z":
        num2 = i

print(num2 - num + 1)
Buggy code:
s=input()
a=s.index("A")
z=s[::-1].index("Z")
print(len(s[a:-z]))

Fixed code:
s = input()
a = s.index('A')
z = s[::-1].index('Z')
print(len(s)-a-z)
Buggy code:
def main():
  s=input()
  start=0
  end=len(s)
  for i in range(0,len(s)):
    if s[i]=='A':
      start=i
      break
  for i in range(1,len(s)):
    if s[-i]=='Z':
      end=len(s)-i
      break
main()


Fixed code:
def main():
  s=input()
  start=0
  end=len(s)
  for i in range(0,len(s)):
    if s[i]=='A':
      start=i
      break
  for i in range(1,len(s)):
    if s[-i]=='Z':
      end=len(s)-i
      break
  print(end-start+1)
main()
Buggy code:
a = list(input())

for i in range(len(a)):
  if a[i] == "A":
    k = i
for i in range(len(a),0,-1):
  if a[i] == "Z":
    kk = i
print(kk-k+1)

Fixed code:
a = list(input())

for i in range(len(a)):
  if a[i] == "A":
    k = i
    break
for i in range(len(a)-1,0,-1):
  if a[i] == "Z":
    kk = i
    break
print(kk-k+1)
Buggy code:
s = input()
print(s.find("A")-s.rfind("Z")+1)

Fixed code:
s = input()
print(s.rfind('Z') - s.find('A') + 1)
Buggy code:
s = str.upper(input())

for i in range(len(s)):
    if s[i] == 'A':
        a = i
        break


for i in range(len(s)):
    if s[i] == 'Z':
        b = i + 1
        break
print(b-a)

Fixed code:
s = str.upper(input())

for i in range(len(s)):
    if s[i] == 'A':
        a = i
        break


for i in range(1,len(s)):
    if s[-i] == 'Z':
        b = len(s) + 1 - i
        break
print(b-a)
Buggy code:
s = str(input())
a = s.find("A")
z = s.find("Z")
print(len(s[a:z + 1]))


Fixed code:
s = str(input())
a = s.find("A")
z = s.rfind("Z")
print(len(s[a:z + 1]))
Buggy code:
string = input()
for i in range(len(string)):
    if string[i] == 'A':
        start=i
        break
for j in reversed(range(start+1, len(string))):
    if string[j]=='Z':
        end=j
        break
print(string[i:j+1])

Fixed code:
string = input()
for i in range(len(string)):
    if string[i] == 'A':
        start=i
        break
for j in reversed(range(start+1, len(string))):
    if string[j]=='Z':
        end=j
        break
print(len(string[i:j+1]))
Buggy code:
S = input()
for i in range(len(S)):
  c = S[i]
  if c == "A" and s is None :s = i
  if c == "Z":e = i
print(e-s+1)


Fixed code:
S = input()
s = None
for i in range(len(S)):
  c = S[i]
  if c == "A" and s is None:
    s = i
  if c == "Z":
    e = i
print(e-s+1)
Buggy code:
S = input()
L = len(S)
for i in range(L):
  c = S[i]
  if c == "A":
    s = i
    break
for i in range(L):
  c = S[-(i+1)]
  if c == "Z":
    e = L - (i+1)
    break
print(S[s:e+1])


Fixed code:
S = input()
L = len(S)
for i in range(L):
  c = S[i]
  if c == "A":
    s = i
    break
for i in range(L):
  c = S[-(i+1)]
  if c == "Z":
    e = L - (i+1)
    break
print(e-s+1)
Buggy code:
s = input()
index = []
for i, c in enumerate(s):
    if c == "A":
        index.append(i)
        break

for i, c in enumerate(reversed(s)):
    if c == "Z":
        index.append(i)
        break

count = len(s[index[0]:-index[1]])
print(count)

Fixed code:
s = input()
index = []
for i, c in enumerate(s):
    if c == "A":
        index.append(i)
        break

for i, c in enumerate(reversed(s)):
    if c == "Z":
        index.append(len(s)-i)
        break

count = len(s[index[0]:index[1]])
print(count)
Buggy code:
a=input()
for i in range(len(a)):
  if a[i]=="A":
    b=i
    break
for i in range(len(a)):
  if a[len(a)-i-1]:
    c=i
    break
print(c-b)

Fixed code:
a=input()
for i in range(len(a)):
  if a[i]=="A":
    b=i
    break
for k in range(len(a)):
  if a[-k-1]=="Z":
    c=k
    break
print(len(a)-c-b)
Buggy code:
	input_str=input()
	# input_str="QWERTYASDFZXCV"
	# input_str="ZABCZ"
	# input_str="HASFJGHOGAKZZFEGA"
	b=0
	e=0
	length=len(input_str)
	for i, s in enumerate(input_str):
		if s=="A":
			b=i
			# print(b)
			break
	for i, s in enumerate(input_str[::-1]):
		if s=="Z":
			e=length-i
			# print(e)
			break
	print(e-b)


Fixed code:
input_str=input()
# input_str="QWERTYASDFZXCV"
# input_str="ZABCZ"
# input_str="HASFJGHOGAKZZFEGA"
b=0
e=0
length=len(input_str)
for i, s in enumerate(input_str):
	if s=="A":
		b=i
		# print(b)
		break
for i, s in enumerate(input_str[::-1]):
	if s=="Z":
		e=length-i
		# print(e)
		break
print(e-b)
Buggy code:
S = input()
len = len(S)
start = len
end = 0
for i in range(len):
  if(S[i] == "A"):
    temp_start = i+1
    start = min(start,temp_start)
  if(S[i] == "Z"):
    temp_end = i+1
    end = max(end,temp_end)
print(end-start)

Fixed code:
S = input()
len = len(S)
start = len
end = 0
for i in range(len):
  if(S[i] == "A"):
    temp_start = i+1
    start = min(start,temp_start)
  if(S[i] == "Z"):
    temp_end = i+1
    end = max(end,temp_end)
print(end-start+1)
Buggy code:
s=str(input())
s=list(s)
for i in range(0,len(s)):
  if s[i]=="A":
    temp1=i
    break    
for j in range(temp1+1,len(s)):
  if s[j]=="Z":
    temp2=j
    break 
print(temp2-temp1+1)

Fixed code:
s=str(input())
s=list(s)
for i in range(0,len(s)):
  if s[i]=="A":
    temp1=i
    break    
for j in range(0,len(s)-temp1):
  if s[len(s)-j-1]=="Z":
    temp2=len(s)-j-1
    break 
print(temp2-temp1+1)
Buggy code:
s = input()

a = 0
for n, i in enumerate(reversed(s)):
    if i == "Z":
        a = len(s) - n

b = 0
for n, i in enumerate(s):
    if i == "A":
        b = n

print(a - b)


Fixed code:
s = input()

a = 0
for n, i in enumerate(reversed(s)):
    if i == "Z":
        a = len(s) - n
        break

b = 0
for n, i in enumerate(s):
    if i == "A":
        b = n
        break

print(a-b)
Buggy code:
A = input()
N = len(A)
print(A)
for i in range(N):
    if A[i] == 'A':
        S = i
        break
for i in range(N):
    if A[N-i-1] == 'Z':
        E = i
        break
print(N - S - E)


Fixed code:
A = input()
N = len(A)
#print(A)
for i in range(N):
    if A[i] == 'A':
        S = i
        break
for i in range(N):
    if A[N-i-1] == 'Z':
        E = i
        break
print(N - S - E)
Buggy code:
s = input()
for a in range(len(s)):
  if s[a]=='A':
    break
s = s[::-1]
for z in range(len(s)):
  if s[z] =='Z':
    break
s= s[::-1]
print(s[a:-z+1])

Fixed code:
s = input()
for a in range(len(s)):
  if s[a]=='A':
    break
s = s[::-1]
for z in range(len(s)):
  if s[z] =='Z':
    break
print(len(s)-z-a)
Buggy code:
s = input()
t = s[::-1]

for i in range(len(s)):
  if s[i] == "A":
    break
for j in range(len(t)):
  if t[j] == "Z":
    break
print(len(s[i:-j]))

Fixed code:
s = input()
t = s[::-1]
 
for i in range(len(s)):
  if s[i] == "A":
    break
for j in range(len(t)):
  if t[j] == "Z":
    break
if j != 0:
  print(len(s[i:-j]))
if j == 0:
  print(len(s[i:]))
Buggy code:
S = list(input())
st = 0
ed = 0
for i in range(len(S)):
    if (S[i] == 'A'):
        st = min(i, st)
        print(S[i], i, st)
    if (S[i] == 'Z'):
        ed = i
        print(S[i], i, ed)
ans = ed - st + 1
print(ans)

                        



Fixed code:
S = list(input())
st = len(S)
ed = 0
for i in range(len(S)):
    if (S[i] == 'A'):
        st = min(i, st)
    if (S[i] == 'Z'):
        ed = i
ans = ed - st + 1
print(ans)
Buggy code:
s = input()


def get_z_idx(s):
    l = len(s) - 1
    for i in range(l, -1, -1):
        if s[i] == 'Z':
            z_idx = i
            break
    return z_idx


def main(s):
    a_idx = s.index('A')
    z_idx = get_z_idx(s)
    _s = s[a_idx:z_idx + 1]
    return _s


print(main(s))

Fixed code:
s = input()


def get_z_idx(s):
    l = len(s) - 1
    for i in range(l, -1, -1):
        if s[i] == 'Z':
            z_idx = i
            break
    return z_idx


def main(s):
    a_idx = s.index('A')
    z_idx = get_z_idx(s)
    _s = s[a_idx:z_idx + 1]
    return len(_s)


print(main(s))