qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a, b = input().split()
a1, b1 = list(map(int, input().split()))

print(str(a1) + " " + str(b1 - 1) if input() == b else str(a1 - 1) + " " + b1)

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

print(str(a1) + " " + str(b1 - 1) if input() == b else str(a1 - 1) + " " + str(b1))
Buggy code:
s, _ = list(input().split())
a, b = list(map(int, input().split()))
u = input()
if s == u:
    a -= 1
else:
    b -= u
print(a, end=' ')
print(b)

Fixed code:
s, _ = list(input().split())
a, b = list(map(int, input().split()))
u = input()
if s == u:
    a -= 1
else:
    b -= 1
print(a, end=' ')
print(b)
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
print("{0} {1}".format(a,b))

Fixed code:
s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())
if s == u:
    a -= 1
elif t == u:
    b -= 1
print("{0} {1}".format(a,b))
Buggy code:
def I(): return int(input())
def MI(): return map(int, input().split())
def LMI(): return list(map(int, input().split()))


S, T = input().split()
A, B = MI()
U = input()
if U == S:
    S -= 1
elif U == T:
    B -= 1
print(A, B)

Fixed code:
def I(): return int(input())
def MI(): return map(int, input().split())
def LMI(): return list(map(int, input().split()))


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

if S == U:
  A = A - 1
else:
  B = B - 1
  print(' '.join(map(str, [A, B])))

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(' '.join(map(str, [A, B])))
Buggy code:
s,t=map(str,input().split())
a,b=map(int,input().split())
ss=input()
if ss="s":
  a-=1
else:
  b-=1
print(a,b)


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

    d = {a: an, b:bn}
    d[s] -= 1

    print("{} {}".format(d[a], d[b]))

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

d = {a: an, b:bn}
d[s] -= 1

print("{} {}".format(d[a], d[b]))
Buggy code:
s, t = input().split()
num = list(map(int, input().split()))
u = input().split()

if u[0] == s:
  nums = num[0] -1
  numt = num[1]
else:
  nums = num[0] -1
  numt = num[1] -1

l = str(nums) + " " + str(numt)
print(l)

Fixed code:
s, t = input().split()
num = list(map(int, input().split()))
u = input()

if u == s:
  nums = num[0] -1
  numt = num[1]
else:
  nums = num[0]
  numt = num[1] -1

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

Fixed code:
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)
Buggy code:
a,b = input().split()
c,d = map(int,input().split())
t=input()
print(c-1 if t==a else a,d-1 if t==b else d)

Fixed code:
a,b = input().split()
c,d = map(int,input().split())
t=input()
print(c-1 if t==a else c,d-1 if t==b else d)
Buggy code:
S, T = map(str, input().split())
A, B = map(int, input().split())
U = str(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:
    print(str(A-1)+' '+str(B))
else:
    print(str(A)+' '+str(B-1))
Buggy code:
from sys import stdin

s, t = stdin.readline().rstrip().split()
a, b = [int(x) for x in stdin.readline().rstrip().split()]
u = stdin.readline().rstrip().split()

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


print(str(a) + " " + str(b))

Fixed code:
from sys import stdin

s, t = stdin.readline().rstrip().split()
a, b = [int(x) for x in stdin.readline().rstrip().split()]
u = stdin.readline().rstrip()

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

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

if s==u:
  print( str(a-1) +" "+ str(b) )
else:
  print( str(a) +" "+ str(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(str,input().split())
a,b = map(int,input().split())
u =map(str,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 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 =map(int,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 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=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 u == s:
  a -= 1
else:
  b -= 1
print(a,b)
Buggy code:
s,t = input().split()
a,b = map(int,input().split())
u = input()
print(a,b-1 if u == t else a-1,b)

Fixed 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)
Buggy code:
'''
red blue
3 4
red
'''
a, b = [x for x in input().split()]
an, bn = [int(x) for x in input().split()]
threw = input()
if threw == a:an -= 1
  else:
    bn -= 1
print(an, bn)    
  

Fixed code:
'''
red blue
3 4
red
'''
a, b = [x for x in input().split()]
an, bn = [int(x) for x in input().split()]
threw = input()
if threw == a:an -= 1
else:
    bn -= 1
print(an, bn)
Buggy code:
a,b=map(int,input().split())
s,t,u=map(input().split())
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

Fixed code:
s, t = map(str, input().split())
a, b = map(int, input().split())
u = str(input())
if u == s:
  a -= 1
if u == t:
  b -= 1
print(a,b)
Buggy code:
S,T = map(str,input().split())
A,B = map(str,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:
  print(A-1,B)
else:
  print(A,B-1)
Buggy code:
a,b=input().split()
c,d=map(int,input().split())
e=int(input())
if e==a:
  c-=1
else:
  d-=1
print(c,d)

Fixed code:
a,b=input().split()
c,d=map(int,input().split())
e=input()
if e==a:
  c-=1
else:
  d-=1
print(c,d)
Buggy 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)

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()

S = A
T = B

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




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(int, input().split())
a, b = map(int, input().split())
u = input()

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

if u == t:
  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:
ef remaining_ball():
    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)
remaining_ball()

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:
s,t,a,b,u=open(0).read().split()
if s==u:
    print(int(a)-1)
elif t==u:
    print(int(b)-1)

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

if s==u:
    print(a[1])
else:
    print(a[0])

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

if s==u:
    a[0]-=1
else:
    a[1]-=1
print(a[0],a[1])
Buggy code:
S,T=map(input().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 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()

if U == S:
    A -= 1
elif U == 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)
else:
    print(A, B-1)
Buggy code:
s,t = input().split()
a,b = list(map(int, input().split()))
u = input()

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

Fixed code:
s,t = input().split()
a,b = list(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 = map(int, input().split())
u = input()

if s == u:
  a -= 1
elif t == u:
  b -= 0

print(a, b)

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:
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
s,t = [i.rstrip() for i in readline().split()]
a,b = [int(i) for i in readline().split()]
u = readline()

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

Fixed code:
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
s,t = [i.rstrip() for i in readline().split()]
a,b = [int(i) for i in readline().split()]
u = readline().rstrip()

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())
print(a-1,b if u==s else 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 = map(str,input().split())
a,b = map(int,input().split())
u = input()
print(a-1 if s == u else b-1)

Fixed 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)
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=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())
if u == s:
    a = a-1
else :
    b = b-1
    
print("{} {}".format(s, t))
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
   
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 s == u:
    a -= 1
elif s == t:
    b -= 1
print(a, b)

Fixed code:
s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == t:
    print(a, b-1)
if u == s:
    print(a-1, b)
Buggy code:
s, t = input().split()
a, b = int(input().split())
u = input()
if s == u:
  print(s-1,t)
else:
  print(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:
w = list(map(input().split()))
n = list(map(int, input().split()))
u = input()

if u == w[0]:
  print(n[0]-1,n[1])
else:
  print(n[0],n[1]-1)

Fixed code:
w = list(input().split())
n = list(map(int, input().split()))
u = input()

if u == w[0]:
  print(n[0]-1,n[1])
else:
  print(n[0],n[1]-1)
Buggy code:
s = input().split()
i = list(map(int, input().split()))
a=input()
if a==s[0]:
  i[0]-=1
elif a==s[1]:
  i[1]-=1
print(i)

Fixed code:
s = input().split()
i = list(map(int, input().split()))
a=input()
if a==s[0]:
  i[0]-=1
elif a==s[1]:
  i[1]-=1
print(i[0],i[1])
Buggy code:
L = input().split()
S = L[0]
T = L[0]
a,b = map(int, input().split())
U = input()
if U == S:
  a = a-1
elif U == T:
  b = b -1

print(a, b)

Fixed code:
L = input().split()
S = L[0]
T = L[1]
a,b = map(int, input().split())
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())
x=input()
if x==s:
    print(a-1, b)
else: print(a, b-1)
Buggy code:
s,b = input().split()
d = {}
d[s],d[b] = [int(x) for x in input().split()]
d[input] -= 1
print(d[s],d[b])

Fixed code:
s,b = input().split()
d = {}
d[s],d[b] = [int(x) for x in input().split()]
d[input()] -= 1
print(d[s],d[b])
Buggy code:
s,t=input().split()
a,b=map(int,input()split())
u=input()
if u==s:
    a-=1
elif: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)
else:
    print(a,b-1)
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 = map(str, input().split())
A, B = map(int, input().split())
U = str(input())

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

print(A,B)
Buggy code:
S, T = input().split()
lis = list(input().split())
N1 = int(lis[0])
N2 = int(lis[1])
Z = input()
print(S,T,lis,Z,N1,N2)

if Z == S:
    print(N1-1,N2)
elif Z == T:
    print(N1,N2-1)
else:
    print(N1,N2)

Fixed code:
S, T = input().split()
lis = list(input().split())
N1 = int(lis[0])
N2 = int(lis[1])
Z = input()
#print(S,T,lis,Z,N1,N2)

if Z == S:
    print(N1-1,N2)
elif Z == T:
    print(N1,N2-1)
else:
    print(N1,N2)
Buggy code:
a,b=input().split()
c,d=map(int,input().split())
e=imput()
if e==a:
  c=c-1
else:
  d=d-1
print(c,d)


Fixed code:
a,b=input().split()
c,d=map(int,input().split())
e=input()
if e==a:
  c=c-1
else:
  d=d-1
print(c,d)
Buggy code:
s,t = input().split()
a,b = map(int,input().split()
u = input()
          
if u == s:
	print(a-1,b)
elif u == t:
    print(a,b-1)
else:
    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=list(input())
s,t=list(map(int, input().split()))
U=input()
if U==S:
  print(s-1,t)
else:
  print(s,t-1

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

if U == S:
    A -= 1
if U == B:
    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
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)

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 =map(int, input().split())
x = input()

if x == a:
  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:print(a-1,b)
else:print(a,b-1)
Buggy code:
s,t=map(str,input().split())
a,b=map(int,input().split())
q=input()
print("{x} {y}".format(a-1,b) if q==s else "{x} {y}".format(a,b-1))


Fixed code:
s,t=map(str,input().split())
a,b=map(int,input().split())
q=input()
print("{} {}".format(a-1,b) if q==s else "{} {}".format(a,b-1))
Buggy code:
s = list(map(int, input().split()))
num = list(map(int, input().split()))
ALL = {}
for i in range(len(s)):
  ALL[s[i]] = num[i]

ALL[input()] -= 1

for i in range(len(s)):
  print(ALL[s[i]], end = ' ')



Fixed code:
s = list(map(str, input().split()))
num = list(map(int, input().split()))
ALL = {}
for i in range(len(s)):
  ALL[s[i]] = num[i]
 
ALL[input()] -= 1
 
for i in range(len(s)):
  print(ALL[s[i]], end = ' ')
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:
    print(A-1, B)
else:
    print(A, B - 1)
Buggy code:
A = input()
a,b = (A.split(' '))
B = input()
c,d = (B.split(' '))
e = int(c)
f = int(d)
C = input()

if A == C:
    print('{} {}'.format(e-1,f))
else:
    print('{} {}'.format(e,f-1))


Fixed code:
A = input()
a,b = (A.split(' '))
B = input()
c,d = (B.split(' '))
e = int(c)
f = int(d)
C = input()

if a == C:
    print('{} {}'.format(e-1,f))
else:
    print('{} {}'.format(e,f-1))
Buggy code:
s, t = input().split()
a,b = map(int, input().split())
u = input()
if s == u:
    print(a-1, b)
elif s == t:
    print(a, b-1)

Fixed 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)
Buggy 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)

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 s == t:
  a -= 1
else:
  b -= 1
print(str(a) + " " + str(b))

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:
a,b=input().split()
n,m=map(int,input().split())
c=input()
if a==c:
    print(a-1,b)
else:
    print(a,b-1)

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

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()
if s==u:
  print(a-1,b)
elif s==t:
  print(a,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:
s,t=input().split()
a,b=map(int.input().split())
u=input()
print(a-1,b) if s==i else print(a,b-1)

Fixed 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)
Buggy code:
s,t=list(map(str,input().split()))
a,b=list(map(int,input().split()))
u=str(input())

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

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

if s==u:
    print(a-1, b)
elif u==t:
    print(a, b-1)
Buggy code:
s = input().split()
num = [int(i) for i in input().split()]
u = input()
num1 = num[0]
num2 = num[1]

if s[0] == u:
    nums = num1 - 1
    print("{} {}".format(nums, num1))
elif s[1] == u:
    nums = num2 - 1
    print("{} {}".format(num1, nums))


Fixed code:
s = input().split()
num = [int(i) for i in input().split()]
u = input()
num1 = num[0]
num2 = num[1]

if s[0] == u:
    nums = num1 - 1
    print("{} {}".format(nums, num2))
elif s[1] == u:
    nums = num2 - 1
    print("{} {}".format(num1, nums))
Buggy code:
s,t=input().split()
a,b=map(int.input().split())
u=input()
print(a-1,b) if s==u else print(a,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:
n, m = map(str, input().split())
a, b = map(int, input().split())
u = str(input())

if n==u:
  a=a-1
  
if m==u:
  b=b-1

print(n,m)
print(a,b)
print(u)

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

if n==u:
  a=a-1
  
if m==u:
  b=b-1

print(a ,b)
Buggy code:
S,T=input().split()
A,B=map(int,input().split())
U=input()
dic={S:A,T:B}
dict[U]-1
print(dict[S] dict[T])

Fixed code:
S,T=input().split()
A,B=map(int,input().split())
U=input()
dic={S:A,T:B}
dic[U]-=1
print(dic[S],dic[T])
Buggy code:
S, T = map(input().split())
A, B = 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 = map(int,input().split())
U = input()
if S==U:
    print(A-1,end=' ')
    print(B)
else:
    print(A,end=' ')
    print(B-1)
Buggy code:
def resolve():
    S, T = input().split()
    A, B = map(int, input().split())
    U = input().split()
 
    if S == U:
        A = A - 1
    else:
        B = B - 1
 
    print(A, B)
 
if __name__ == "__main__":
    resolve()

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

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

Fixed code:

s,t  = input().split()
a, b = list(map(int, input().split()))
u = input ()

if u == s:
    a -= 1
elif u == t:
    b -= 1


print (a,b)
Buggy code:
a,b=map(int,input().split())
u=str(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
else :
    b-=1
print(a,b)
Buggy code:
S, T = map(str, input().split)
A, B = map(int, input().split)
input()

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A.b))


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

a = A - 1
b = B - 1

if U == S:
  print('{} {}'.format(a,B))
else:
  print('{} {}'.format(A,b))
Buggy code:
S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == T:
    A = A-1
else:
    B = 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(str(A-1), str(B))
elif U == T:
  print(str(A), str(B-1))
else:
  print(str(A), str(B))
Buggy code:
str1, str2 = input().split()
cnt1, cnt2 = list(map(int, input().split()))
tar = input()

if tar == str1:
  cnt1 -= 1
else
  cnt2 -= 1

print(str(cnt1) + " " + str(cnt2))

Fixed code:
str1, str2 = input().split()
cnt1, cnt2 = list(map(int, input().split()))
tar = input()

if tar == str1:
  cnt1 -= 1
else:
  cnt2 -= 1

print(str(cnt1) + " " + str(cnt2))
Buggy code:
S, T = input().split()
A, B = map(int, input().split())
U = input()
C = 0
if S == U:
    C = A - 1
elif T == U:
    C = B - 1
else:
	A = A

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

Fixed code:
S, T = input().split()
A, B = map(int, input().split())
U = input()
C = 0
D = 0
if S == U:
    C = A - 1
    D = B
elif T == U:
    D = B - 1
    C = A
else:
    A = A

print(C, D)
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 U == S:
  print(A - 1,B)
else:
  print(A,B - 1)
Buggy code:
s, t =  input().split()
a, b = map(int, input().split())
u = input()

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

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

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

if U == S:
  A -= 1
if U == T:
  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 = A-1
else:
  B = B-1
print(A, B)