qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n = input()
n = n[::-1]
l = len(n)
ans = 0
flg = 0
for j in range(l):
  i = n[j]
  i = int(i)
  if i+flg>=6:
    i += flg
    ans += (10-i)
    flg = 1
  elif i == 5:
    if j == l-1:
      ans += i
      flg = 0
    elif int(n[j+1]) >= 5:
      i += flg
      ans += (10-i)
      flg = 1
    else:
      ans += i
      flg = 0   
  else:
    i += flg
    ans += i
    flg = 0
if flg:
  ans += 1
print(ans)

Fixed code:
n = input()
n = n[::-1]
l = len(n)
ans = 0
flg = 0
x = []
for j in range(l):
  i = n[j]
  i = int(i)
  if i+flg>=6:
    i += flg
    ans += (10-i)
    flg = 1
  elif i+flg == 5:
    if j == l-1:
      ans += i+flg
      flg = 0
    elif int(n[j+1]) >= 5:
      i += flg
      ans += (10-i)
      flg = 1
    else:
      ans += i+flg
      flg = 0
  else:
    i += flg
    ans += i
    flg = 0
if flg:
  ans += 1
print(ans)
Buggy code:
from sys import stdin

def slove():
    S, T = stdin.readline().rstrip().split()
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    U = input()

    if S == U:
        print(A-1, B)
    else T == U:
        print(A, B-1)
    else:
        print(A, B)


slove()


Fixed code:
from sys import stdin

def slove():
    S, T = stdin.readline().rstrip().split()
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    U = input()

    if S == U:
        print(A-1, B)
    elif T == U:
        print(A, B-1)
    else:
        print(A, B)


slove()
Buggy code:
s, t = input().split()
a, b = map(int, input().split())
u = input()

if s == u:
    print(s - 1 , t)
else:
    print(s, t - 1)

Fixed code:
s,t = map(str,input().split())
a,b = map(int,input().split())
u = input()
if u == s: print(a-1,b)
else: print(a,b-1)
Buggy code:
s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())
x = a-1,b
y = a,b-1
if s==u:
  print(x)
else:
  print(y)

Fixed code:
s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())
if s==u:
  print(a-1,b)
else:
  print(a,b-1)
Buggy code:
S, T = input().split()
a, b = map(int, input().split())
U = input().strip()
print(a - S == U, b - S == T)

Fixed code:
S, T = input().split()
a, b = map(int, input().split())
U = input().strip()
print(a - (S == U), b - (T == U))
Buggy code:
a = list(map(str, input().split()))
b = list(map(int, input().split()))
c = list(map(str, input().split()))
if a[0] == c:
	b[0] = b[0] - 1
else: b[1] = b[1] -1
print(b[0],b[1])

Fixed code:
a = list(map(str, input().split()))
b = list(map(int, input().split()))
c = list(map(str, input().split()))
if a[0] == c[0]:
	b[0] = b[0] - 1
else: b[1] = b[1] -1
print(b[0],b[1])
Buggy code:
a = [i in input().split()]
nums = [int(i) in input().split()]
thr = input()
if(thr == a[0]):
	nums[0] -= 1
else:
	nums[1] -= 1
print(nums[0],nums[1])

Fixed code:
a = [i for i in input().split()]
nums = [int(i) for i in input().split()]
thr = input()
if(thr == a[0]):
	nums[0] -= 1
else:
	nums[1] -= 1
print(nums[0],nums[1])
Buggy code:
a,b=input().split()
c,d=map(int,input().split())
print(c-1 if input()==a else d-1)

Fixed code:
a,b=input().split()
c,d=map(int,input().split())
if input()==a:
    print(c-1,d)
else:
    print(c,d-1)
Buggy code:
S,T = input().strip().split(' ')
A,B = map(int, input().strip().split(' '))
U = input().strip()

if U == A:
  print(A-1,B)
else U == T:
  print(A,B-1)



Fixed code:
S,T = input().strip().split()
A,B = map(int, input().strip().split())
U = input().strip()

if U == S:
  print(A-1,B)
else:
  print(A,B-1)
Buggy code:
n = input()
(s,t) = n.split()
m = input()
(a,b)=m.split()
k = input()
if k is  s:
    a_1 = int(a) - 1
    print(str(a_1)+' '+ b)
else:
    b_1 = int(b) -1
    print(a +' '+str( b_1))



Fixed code:
n = input()
(s,t) = n.split()
m = input()
(a,b)=m.split()
k = input()
if k == s:
    a_1 = int(a) - 1
    print(str(a_1)+' '+ b)
else:
    b_1 = int(b) -1
    print(a +' '+str( b_1))
Buggy code:
s,t = input().split()
a,b = map(int,input().split())
u = input()
if u == s:
    print(a-1)
else:
    print(b-1)

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

if s == u:
    a -= 1
elif t == u:
    b -= 1
print(a, b)
Buggy code:
def main():
    S,T = input().split()
    a,b = map(int,input().split())
    u = input()
    print(a-1,b if S == u else a,b-1)
    return

if __name__ == "__main__":
    main()

Fixed code:
def main():
    S,T = input().split()
    a,b = map(int,input().split())
    u = input()
    if S == u:
        print(a-1,b)
    else:
        print(a,b-1)
    return

if __name__ == "__main__":
    main()
Buggy code:
S,T = int().split()
A,B = map(int,input().split())
U = input()

if U == S:
  A = A - 1
else:
  B = B - 1
print(A,B)



Fixed code:
S, T = input().split()
A, B = map(int,input().split())
U=input()
if S==U:
    print(A-1,B)
elif T==U:
    print(A,B-1)
Buggy code:
S,T=map(int,input().split())
A,B=map(int,input().split())
U=input()
if U==S:
  A=A-1
else:
  B=B-1
print('{} {}'.format(A,B))


Fixed code:
S,T=input().split()
A,B=map(int,input().split())
U=input()
if U==S:
  A=A-1
else:
  B=B-1
print('{} {}'.format(A,B))
Buggy code:
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u == s:
  a -= 1
 else:
  b -= 1
 print(a, b)

Fixed code:
s,t = map(str,input().split())
a,b = map(int,input().split())
u=input()

if u==s:
    a-=1
else:
    b-=1

print(a,b)
Buggy code:
def main():
    s,t = list(input().split())
    a,b = map(int,input().split())
    ss = input()

    if ss == s:
        print(str(a-1) + ' ' + str(b))
        return
    else:
        print(str(a) + ' ' + str(b))
if __name__=='__main__':
    main()


Fixed code:
def main():
    s,t = list(input().split())
    a,b = map(int,input().split())
    ss = input()

    if ss == s:
        print(str(a-1) + ' ' + str(b))
        return
    else:
        print(str(a) + ' ' + str(b-1))
if __name__=='__main__':
    main()
Buggy code:
s,t = map(input().split())
a,b = map(int,input().split())
u = input()

if u == s:
  print((a-1),b)
else:
  print(a,(b-1))

Fixed code:
s,t=map(str,input().split())
a,b=map(int,input().split())
u=str(input())
if u==t:
    print(a,b-1)
else:
    print(a-1,b)
Buggy code:
S, T = input().split()
A, B = map(int, input().split())
U = input()
print(A-1 B if S==U else A B-1)

Fixed code:
S,T = input().split()
A,B = map(int,input().split())
U = input()
if S==U:
    A -= 1
else:
    B -= 1
print(A,B)
Buggy code:
S,T=map(str,input().split())
A,B=map(int,input().split())
U=str(input())
if U==S:
  A=A-1
elif U==T:
  B=B-1
print({} {}.format(A,B))

Fixed code:
S,T=map(str,input().split())
A,B=map(int,input().split())
U=str(input())
if U==S:
  A=A-1
elif U==T:
  B=B-1
print("{} {}".format(A,B))
Buggy code:
s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
  print(a-1)
elif t==u:
  print(b-1)

Fixed code:
s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
  print(a-1,b)
elif t==u:
  print(a,b-1)
Buggy code:
S, T = map(int, input().split())
A, B = map(int, input().split())
U = input()

if S==U:
    print(A-1)
else:
    print(B-1)

Fixed code:
S,T = map(str,input().split())
A,B = map(int,input().split())
U = input()
if S == U:
    A -= 1
else:
    B -= 1
print(A,B)
Buggy code:
S,T = input().split()
a,b = list(map(int,input().split()))
u = input()

if S = u:
    print(a-1,b)
else:
    print(a,b-1)

Fixed code:
S,T = input().split()
a,b = list(map(int,input().split()))
u = input()
 
if S == u:
    print(a-1,b)
else:
    print(a,b-1)
Buggy code:
s, t = input().split(' ')
a, b = map(int, input().split(' '))
u = input()

if u == s:
    print(a - 1)
elif u == t:
    print(b - 1)


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

if s == u:
    a -= 1
elif t  == u:
    b -= 1
print(str(a) + " " + str(b))
Buggy code:
list1 = input()
list1 = list1.split(' ')
list2 = input()
list2 = list2.split(' ')
list3 = input()
S = list1[0]
T = list1[1]
lenS = int(list2[0])
lenT = int(list2[1])
select = list3[0]
if select == S:
    lenS -= 1
elif select == T:
    lenT -= 1
print(lenS,lenT)

Fixed code:
list1 = input()
list2 = input()
list3 = input()
nlist1 = list1.split(' ')
nlist2 = list2.split(' ')
S = nlist1[0]
T = nlist1[1]
lenS = int(nlist2[0])
lenT = int(nlist2[1])
select = list3
if select == S:
    lenS -= 1
elif select == T:
    lenT -= 1
print(lenS,lenT)
Buggy code:
s, t = input().split()
a, b = map(int, input().split())
u = input().split()
if s == u:
  a -= 1
else:
  b -= 1
print(a, b)
  
  


Fixed code:
s,t = map(str, input().split())
a,b = map(int, input().split())
u = input()

if u==s:
    print(a-1,b)
else:
    print(a,b-1)
Buggy code:
import numpy

S, T = map(str, input().split())
AB = list(map(int, input().split()))
U = input()

if U == S:
    tmp = numpy.array([1,0])
else:
    tmp = numpy.array([0,1])
print(numpy.array(AB-tmp))

Fixed code:
import numpy

S, T = map(str, input().split())
AB = list(map(int, input().split()))
U = input()

if U == S:
    tmp = numpy.array([1,0])
else:
    tmp = numpy.array([0,1])
print(numpy.array(AB-tmp)[0], numpy.array(AB-tmp)[1])
Buggy code:
# coding: utf-8
s,t = input().split()
a,b = map(int, input().split())
u = input()

if u == s:
    print(a-1)
else:
    print(b-1)

Fixed code:
# coding: utf-8
s,t = input().split()
a,b = map(int, input().split())
u = input()

if u == s:
    print(a-1, b)
else:
    print(a,b-1)
Buggy code:
S, T = map(input().split())
A, B = map(int, input().split())
U = input()
ans = 0

if(S == U):
  ans = A - 1
  print(ans,B)
else:
  ans = B - 1
  print(A,ans)

Fixed code:
S, T = map(str,input().split())
A, B = map(int, input().split())
U = input()
ans = 0

if(S == U):
  ans = A - 1
  print(ans,B)
else:
  ans = B - 1
  print(A,ans)
Buggy code:
s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s:
    print(str(a)-1+" "+str(b))
else:
    print(str(a)+" "+str(b-1))


Fixed code:
s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s:
    print(str(a-1)+" "+str(b))
else:
    print(str(a)+" "+str(b-1))
Buggy code:
s, t = input().split()
a, b = map(int, input())
u = input()

if s == u:
  print(a-1, b)
else:
  print(a, b-1)

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

if s == u:
    a = a - 1
else:
    b = b - 1
print(a, b)
Buggy code:
s,t=map(input().split())
a,b=map(input().split())
u=input()
if s==u:
    a-=1
else:
    b-=1
print(a+b)


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

if u==s:
    a-=1
else:
    b-=1
print(a,b)
Buggy code:
S,T=map(input().split())
a,b=mao(int,input().split())
U=input()

if S==U:
  print(a-1,b)
else:
  print(a,b-1)

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

if S==U:
  print(a-1,b)
else:
  print(a,b-1)
Buggy code:
S, T = map(input().split())
A, B = map(int, input().split())
U = input()

print(S-1 T if U == S else S T-1)

Fixed code:

S, T = input().split(" ")
A, B = map(int,input().split(" "))
U = input()

if S == U:
    print(A-1, B)
else:
    print(A, B-1)
Buggy code:
s,t = input().split()
a,b = map(int,input().split())
u = input()

if u = s:
    print(a-1,b)
else:
    print(a,b-1)


Fixed code:
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u == s:
    a -= 1
if u == t:
    b -= 1
print(a, b)
Buggy code:
S, T= input().split()
A, B= map(int, input().split())
U= input().split()

if (S==U):
    print(A-1 B)
else:
    print(A B-1)

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

if U == S:
  A = A -1
if U == T:
  B = B -1
print(A,B)
Buggy code:
S, T= input().split()
A, B= int(input().split())
U= input().split()

if (S==U):
    print(A-1 B)
else:
    print(A B-1)

Fixed code:
S,T=map(str,input().split())
A,B=map(int,input().split())
U=input()

if U==S:
    A=A-1
else:
    B=B-1

print(A,B)
Buggy code:
S, T= input().split()
A, B= map(int, input().split())
U= input().split()

if (S==U):
    print(str(A-1) B)
else:
    print(A str(B-1))

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

if (S == U):
  print(str(A-1) + ' ' + str(B))
else:
  print(str(A) + ' ' + str(B-1))
Buggy code:
S, T = int, input().split()
A, B = map(int, input().split())
U = input()
ans = [A, B]
if U == S:
    ans[0] = A - 1
else:
    ans[1] = B - 1
print(" ".join(map(str, ans)))


Fixed code:
S, T = input().split()
A, B = map(int, input().split())
U = input()
ans = [A, B]
if U == S:
    ans[0] = A - 1
else:
    ans[1] = B - 1
print(" ".join(map(str, ans)))
Buggy code:
s, t = input().split()
a, b = map(int, input().split())
u = input()

if s = u :
  a -= 1
else:
  b -= 1
print(a, b)


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

if s == u :
  a -= 1
else:
  b -= 1
print(a, b)
Buggy code:
S, T = str(input().split())
A, B = map(int, input().split())
U = str(input())

if S == U:
  print(A - 1, B)
if T == U:
  print(A, B - 1)


Fixed code:
S,T=map(str, input().split())
A,B=map(int, input().split())
U=input()
if U==S:
  print(A-1,B)
else:
  print(A,B-1)
Buggy code:
s,t = input().split()
a,b = input().split()
u = input().split()

if u == s:
    print(int(a)-1,b)
else:
    print(a,int(b)-1)


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

if(s == u):
  a = a-1
else: 
  b = b-1
print(a,b)
Buggy code:
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if s == u:
    a -= 1
elif s == t:
    b -= 1
print(str(a) + ' '+  str(b))

Fixed code:
s, t = map(str, input().split())
a, b = map(int, input().split())
u = str(input())

if u == s:
    print(str(a-1) + ' ' + str(b))
elif u == t:
    print(str(a) + ' ' + str(b-1))
Buggy code:
def resolve():
    s,t = input().split()
    a,b = map(int,input().split())
    u = input()
    print(a-(s==u),b-(t==u))
reoslve()

Fixed code:
def resolve():
    s,t = input().split()
    a,b = map(int,input().split())
    u = input()
    print(a-(s==u),b-(t==u))
resolve()
Buggy code:
S, T = input().split()
A, B = list(map(int,input().split()))
U = input()
 
if U == S:
  print(A-1)
else:
  print(B-1)

Fixed code:
S, T = map(str, input().split())
A, B = map(int, input().split())
U = input()

if U == S:
  print(A-1, B)
else:
  print(A, B-1)
Buggy code:
S,T = (x for x in input().split())
A,B = map(int,input().split())
U = input()
if U ==S:
  print(A-1,B)
elif U ==S:
  print(A,B-1)

Fixed code:
S,T = (x for x in input().split())
A,B = map(int,input().split())
U = input()
if U ==S:
  print(A-1,B)
elif U ==T:
  print(A,B-1)
Buggy code:
S,T=input().split()
A,B map(int, input().split())
U = input()
if S==U:
  print(A-1,B)
elif T==U:
  print(A,B-1)

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

if U==S:
    A-=1
else:
    B-=1
print(A, B)
Buggy code:
S, T = input().split()
A, B= map(int, input().split())
U = input()
if S == U:
    print(A - 1, B)
elif T==U:
    print(A, B - 1)
else:

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

# print(S,T)
# print(A)
# print(B)
# print(U)

if U == S:
    print(A-1, B)
else:
    print(A,B-1)
Buggy code:
(s,t)=input().split()
a=input()
(n,m)=list(map(int,a))
u=input()
if u==s:
  print(n-1,m)
elif u==t:
  print(n,m-1)


Fixed code:
(s, t) = input().split()
a = input().split()
(n, m) = list(map(int, a))
u = input()
if u == s:
    print(n - 1, m)
elif u == t:
    print(n, m - 1)
Buggy code:
S,T=input().split()
A,B=map(int,input().split())
U=input()
if S==U:
    print(len(S)-1,len(T))
else:
    print(len(S),len(T)-1)

Fixed code:
S, T = map(str, input().split())
A, B = map(int, input().split())
U = str(input())
if S == U:
    print(A-1, B)
else:
    print(A, B-1)
Buggy code:
s, t = input().split()
a, b = map(int, input().split())
u = input().split()

if s == u:
  print(a-1, b)
elif t == u:
  print(a, b-1)
else:
  print(a, b)

Fixed code:
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()

if u == s:
  print(a-1,b)
elif u == t:
  print(a,b-1)
Buggy code:
s, t = input().split()
a, b = map(int, input().split())
u = input().split()

if s == u:
  print(a-1, b)
else:
  print(a, b-1)

Fixed code:
s, t = input().split()
a, b = list(map(int, input().split()))
u = input()
if u == s:
    a -= 1
else:
    b -= 1
print(a, b)
Buggy code:
s,t = map(str, input().split())
a,b = map(str, input().split())
u = input()
if s == u:
  print("{} {}".format(a-1, b))
else:
  print("{} {}".format(a, b-1))

Fixed code:
s,t = map(str, input().split())
a,b = map(int, input().split())
u = input()
if s == u:
  print("{} {}".format(a-1, b))
else:
  print("{} {}".format(a, b-1))
Buggy code:
S,T = input().split()
A,B = map(int,input().split())
U = input().strip()
if U==S:
    print(A-1)
else:
    print(B-1)

Fixed code:
S, T = input().split()
A, B = map(int, input().split())
U = input()
if S == U:
    A -= 1
else:
    B -= 1
print(A, B)
Buggy code:
Moji = input().split()
Ball = input().split()
Takahasi = input()

if Moji == Takahasi:
  print(int(Ball[0])-1,int(Ball[1]))
else:
  print(int(Ball[0]),int(Ball[1])-1)

Fixed code:
Moji = input().split()
Ball = input().split()
Takahasi = input()

if Moji[0] == Takahasi:
  print(int(Ball[0])-1,int(Ball[1]))
else:
  print(int(Ball[0]),int(Ball[1])-1)
Buggy code:
colors = list(map(str, input().split()))
print(colors)
numbers = list(map(int, input().split()))
target_color = input() 

for index, color in enumerate(colors):
  if color == target_color:
    numbers[index] = numbers[index] - 1
    
 
for num in numbers:
  print(str(num) + " ", end="") 
  


Fixed code:
colors = list(map(str, input().split()))
numbers = list(map(int, input().split()))
target_color = input() 

for index, color in enumerate(colors):
  if color == target_color:
    numbers[index] = numbers[index] - 1
    
 
for num in numbers:
  print(str(num) + " ", end="")
Buggy code:
S = input().split()
A = list(map(int, input().split()))
Z = input()

if S[0] == Z:
  X = A[1]
  Y = A[0] - 1
if S[1] == Z:
  X = A[0]
  Y = A[1]-1
  
print("{} {}".format(X, Y))

Fixed code:
S = input().split()
A = list(map(int, input().split()))
Z = input()
 
if S[0] == Z:
  X = A[0] - 1
  Y = A[1]
  print("{} {}".format(X, Y))
if S[1] == Z:
  X = A[0]
  Y = A[1] - 1
  print("{} {}".format(X, Y))
Buggy code:
s,t = input().split())
a,b = map(int,input().split())
u = input()

if s == u:
    gap = a -1
    print(gap,b)
else:
    gap = b -1
    print(a,gap)

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

if s == u :
  print(a-1,b)
else:
  print(a,b-1)
Buggy code:
s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())

if s = u:
  ball_gap = a -1
  print(ball_gap)
elif t = u:
  ball_gap = b -1
  print(ball_gap)
  

Fixed code:
s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
  a-=1
elif t==u:
  b-=1
print(a,b)
Buggy code:
a, b=map(str,input().split())
c, d=map(int,input().split())
e=str,input()
if e==a:
  print(c-1,d)
else:
  print(c,d-1)


Fixed code:
a, b=map(str,input().split())
c, d=map(int,input().split())
e=input()
f=str(e)
if a==f:
  print(c-1,d)
else:
  print(c,d-1)
Buggy code:
s,t=map(input().split())
a,b=map(int,input().split())
c=int()

if s==c:
  print("{}""{}".format(a-1,b))
else:
  print("{}""{}".format(a,b-1))

Fixed code:
s,t=input().split()
a,b=map(int,input().split())
c=input()
d=" "
if s==c:
  print("{}""{}""{}".format(a-1,d,b))
else:
  print("{}""{}""{}".format(a,d,b-1))
Buggy code:
s,t = input().split()
a,b = input().split()
a = int(a)
b = int(b)
u = input()
  

print(s,t,a,b,u)

if u == s:
	a= a-1

elif u==t:
	b= b-1
  
print(a,b)

Fixed code:
s,t = input().split()
a,b = input().split()
a = int(a)
b = int(b)
u = input()

if u == s:
	a= a-1

elif u==t:
	b= b-1
  
print(a,b)
Buggy code:
s,t = input().split()
a,b = map(int, input().split())
u = input()

if u == s:
    a+=1
else:
    b+=1

print(a,b)

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

if u == s:
    a-=1
else:
    b-=1

print(a,b)
Buggy code:
S,T = input().split()
A,B = map(int,input().split())
U = input()

if U == S:
	A = A-1
else:
  B = B-1

print (str(A) + ',' + str(B))


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

if U == S:
	A = A-1
else:
  B = B-1

print (str(A) + ' ' + str(B))
Buggy code:
red,blue=input().split()
a,b=(int(x) for x in input().split())
dic={red:a,blue:b}
u=input()
dic[u]-=1
print(dic[a]+" "+dic[b])



Fixed code:
red,blue=input().split()
a,b=(int(x) for x in input().split())
dic={red:a,blue:b}
u=input()
dic[u]-=1
print(str(dic[red])+" "+str(dic[blue]))
Buggy code:
S, T = input().split()

A, B = [int(i) for i in input().split()]

U = input().split()

if U == S :
    A = A - 1
else :
    B = B - 1
    
print(A, B)

Fixed code:
S, T = input().split()

A, B = [int(i) for i in input().split()]

U = input()

if U == S :
    A = A - 1
else :
    B = B - 1
    
print(A, B)
Buggy code:


S, T = input().split()
A, B = map(int, input().split())
U = input()

print(S)
print(U)
if S == U:
    print(A-1, B)
else:
    print(A, B-1)


Fixed code:
S, T = map(str, input().split())
A, B = map(int, input().split())
U = input()

if U == S:
  A -= 1
else:
  B -= 1

print(A, B)
Buggy code:
s,t = map(input().split())
a,b = map(int,input().spli())
u = input()
if u==s:
    print(a-1,b)
else:
    print(a,b-1)

Fixed code:
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if s == u:
    a -= 1
else:
    b -= 1
print(a,b)
Buggy code:
#ABC154A
import sys
from collections import OrderedDict
d = OrderedDict()
s,t = sys.stdin.readline().split()
n1, n2 = map(int, sys.stdin.readline().split())
d[s] = n1
d[t] = n2

d[sys.stdin.readline()] -=1

print(*d.values())

Fixed code:
#ABC154A
import sys
from collections import OrderedDict
d = OrderedDict()
s,t = sys.stdin.readline().split()
n1, n2 = map(int, sys.stdin.readline().split())
d[s] = n1
d[t] = n2

d[sys.stdin.readline().rstrip()] -=1

print(*d.values())
Buggy code:
#!python3.4
# -*- coding: utf-8 -*-
# abc154/abc154_a
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    S,T = i2s().split()
    A,B = i2nn()
    U = i2s()
    d = {S:A, T:B}
    d[U] -= 1
    print(d[A], d[B])
    return

main()


Fixed code:
#!python3.4
# -*- coding: utf-8 -*-
# abc154/abc154_a
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    S,T = i2s().split()
    A,B = i2nn()
    U = i2s()
    d = {S:A, T:B}
    d[U] -= 1
    print(d[S], d[T])
    return

main()
Buggy code:
S, T = input().split()
A, B = input().split()
U = input()
A, B = int(A), input(B)

if U == S:
    A -= 1
elif U == T:
    B -= 1

print(A, B)

Fixed code:
S, T = input().strip().split()
A, B = map(int, input().strip().split())
U = input().strip()
if U==S:
	print(A-1, B)
elif U==T:
	print(A, B-1)
Buggy code:
l=input().split() 
n = list(map(int, input().split()))
t=input()
if l[0]==t:
    n[0]=n-1
    print(n)
elif l[1]==t:
    n[1]=n-1
    print(n)

Fixed code:
l=input().split() 
n = list(map(int, input().split()))
t=input()
if l[0]==t:
    n[0]=n[0]-1
    print(n[0],n[1])
elif l[1]==t:
    n[1]=n[1]-1
    print(n[0],n[1])
Buggy code:
s,t=map(str,input().split())
a,b=map(int,input().split())
u=str(input())

if s==u:
	a-=1
else:
	b-=1

Fixed code:
s,t = map(str,input().split())
a,b = map(int,input().split())
u = input()

if s == u:
    print(a-1 , b)
else:
    print(a , b-1)
Buggy code:

# ABC154
#A Remaining balls
s, t = map(input().split())
a, b = map(int, input().split())
u = input()
if s == u:
    a = a - 1
else:
    b = b -1
print(a, b)


Fixed code:
# ABC154
#A Remaining balls
s, t = map(str,input().split())
a, b = map(int, input().split())
u = input()
if s == u:
    a = a - 1
else:
    b = b -1
print(a, b)