ZhenlongDai/ACPR huggingface dataset:
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)



Failing test case input:
red bltf
5 -1
red

Expected output:
4 -1


Actual output:
5 -2


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
a, b = list(map(int, input().split()))
u = input()
if s == u:
  print(a-1, b)
elif s == t:
  print(a, b-1)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:

Fixed submission (verdict: Accepted):
s, t = input().split()
a, b = list(map(int, input().split()))
u = input()
if s == u:
  print(a-1, b)
elif t == u:
  print(a, b-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
red buel
2 -2
red

Expected output:
1 -2


Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)) 

Failing test case input:
red lbue
-1 3
red

Expected output:
-2 3


Actual output:
-23


Fixed submission (verdict: Accepted):
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))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
 
S, T = input().split()
A, B = map(int, input().split())
U = input()
 
if S==U:
  print(A-1,B)
else:
  print(A,B-1)

Failing test case input:
red blue
10 1
red

Expected output:
9 1


Actual output:
10 0


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = map(int, input().split())
U = input()
 
if S==U:
  print(A-1, B)
else:
  print(A, B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input().split()
c, d = map(int, input().split())
e = input()

if (e == a): c -= 1
else: d -= 1

print("{}" "{}" "{}".format(c," ",d))


Failing test case input:
red blue
10 1
red

Expected output:
9 1


Actual output:
10 0


Fixed submission (verdict: Accepted):
a = input().split()
c, d = map(int, input().split())
e = input()

if (e == a[0]): c -= 1
else: d -= 1

print("{}" "{}" "{}".format(c," ",d))
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = input().split()
na, nb = map(int, input().split())
c = input()
print(na - 1, nb if c == "red" else na, nb - 1)

Failing test case input:
red blue
10 1
red

Expected output:
9 1


Actual output:
9 1 0


Fixed submission (verdict: Accepted):
a, b = input().split()
na, nb = map(int, input().split())
c = input()
if a == c:
  print(na - 1, nb)
else:
  print(na, nb - 1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
[S, T] = [x for x in input().split()]
[A, B] = [int(x) for x in input().split()]
U = input()

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

Failing test case input:
red blue
11 -3
red

Expected output:
10 -3


Actual output:
[10, -3]


Fixed submission (verdict: Accepted):
[S, T] = [x for x in input().split()]
[A, B] = [int(x) for x in input().split()]
U = input()

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
red blue
7 1
red

Expected output:
6 1


Actual output:
6 1 0


Fixed submission (verdict: Accepted):
s,t=map(str,input().split())
a,b=map(int,input().split())
u=str(input())
print((a-1),b) if u==s else print(a,(b-1))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()
A,B = map(int,input().split())
U = input()
print((A-1,B) if S == U else (A,B-1))


Failing test case input:
red blue
7 0
red

Expected output:
6 0


Actual output:
(6, 0)


Fixed submission (verdict: Accepted):
S,T = input().split()
A,B = map(int,input().split())
U = input()
print(A-1,B) if S == U else print(A,B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input().split())
a = list(map(int, input().split()))
a[s.index(input())] -= 1
for i in a:
  print(i, end = '')

Failing test case input:
red blue
11 -1
red

Expected output:
10 -1


Actual output:
10-1

Fixed submission (verdict: Accepted):
s = list(input().split())
a = list(map(int, input().split()))
a[s.index(input())] -= 1
for i in a:
  print(i, end = ' ')

Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S, T = input().split()
A, B = map(int, input().split())
U = input()

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



Failing test case input:
red blve
2 2
red

Expected output:
1 2


Actual output:

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

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

print(A, B)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = map(int, input().split())
U = input()

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


Failing test case input:
red blue
2 1
red

Expected output:
1 1


Actual output:
1 1 0


Fixed submission (verdict: Accepted):

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

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(str, input().split())
c,d = map(int, input().split())
e = input()
if a == e:
  c -= 1
else:
  d -= 1
print(a,b)

Failing test case input:
red blue
3 4
red

Expected output:
2 4

Actual output:
red blue


Fixed submission (verdict: Accepted):
a,b = map(str, input().split())
c,d = map(int, input().split())
e = input()
if a == e:
  c -= 1
else:
  d -= 1
print(c,d)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys


def resolve():
    input = sys.stdin.readline

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

    if S == U:
        A -= 1
        print(str(A) + ' ' + str(B))
        return
    B -= 1
    print(str(A) + ' ' + str(B))


resolve()


Failing test case input:
red lbue
-1 3
red

Expected output:
-2 3


Actual output:
-1 2


Fixed submission (verdict: Accepted):
def resolve():
    S, T = map(str, input().split())
    A, B = map(int, input().split())
    U = input()
 
    if S == U:
        A -= 1
        print(str(A) + ' ' + str(B))
        return
    B -= 1
    print(str(A) + ' ' + str(B))


resolve()

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = map(str, input().split())
A, B = map(int, input().split())
U = input(str)
if S == U:
  print(A-1),
  print(B),
else:
  print(A),
  print(B-1),

Failing test case input:
red bule
-3 -2
red

Expected output:
-4 -2


Actual output:
<class 'str'>-4
-2


Fixed submission (verdict: Accepted):
S, T = map(str, input().split())
A, B = map(int, input().split())
U = str(input())
if S == U:
  print(A-1, end=" ")
  print(B)
else:
  print (A, end=" ")
  print(B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = map(str, input().split())
a, b = map(int, input().split())
n = input()
if n == a: print(a-1, b)
else: print(a, b-1)

Failing test case input:
red laeu
9 2
red

Expected output:
8 2


Actual output:
9 1


Fixed submission (verdict: Accepted):
s, t = map(str, input().split())
a, b = map(int, input().split())
n = input()
if n == s: print(a-1, b)
else: print(a, b-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
a,b = map(int,input().split())
u = input().split()

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

else:
	print(b-1)


Failing test case input:
red blue
5 1
red

Expected output:
4 1


Actual output:
0


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

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

else:
	print(a, b-1)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=input().split()
a=list(map(int,input().split()))
u=input()

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

Failing test case input:
red beul
6 1
red

Expected output:
5 1


Actual output:
1


Fixed submission (verdict: Accepted):
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])

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
a, b = map(int, input().split())
u = input()
print(a-1 if u == s else b-1)

Failing test case input:
red bule
-1 -2
red

Expected output:
-2 -2


Actual output:
-2


Fixed submission (verdict: Accepted):
s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s:
    print(a - 1, b)
else:
    print(a, b - 1)

Problem: p02777
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=input().split()
c,d=input().split()
e=input()
c=int(c)
d=int(d)
if a==e:
  print(c-1)
else:
  print(d-1)

Failing test case input:
red blve
3 9
red

Expected output:
2 9


Actual output:
2


Fixed submission (verdict: Accepted):
a,b=input().split()
c,d=input().split()
e=input()
c=int(c)
d=int(d)
if a==e:
  print(c-1,d)
else:
  print(c,d-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = str(input())

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

Failing test case input:
red beul
6 2
red

Expected output:
5 2


Actual output:
5, 2


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

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

Problem: p02777
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S, T = map(str, input().split())
A, B = map(int, input().split())
U = str(input())
if U == S:
    print(A - 1)
else:
    print(B - 1)

Failing test case input:
red blue
-2 1
red

Expected output:
-3 1


Actual output:
-3


Fixed submission (verdict: Accepted):
S, T = map(str, input().split())
A, B = map(int, input().split())
U = str(input())
if U == S:
    print(A - 1, B)
else:
    print(A, B - 1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()
A,B = map(int,input().split())
u = input()
print(S,T,u)
if S == u:
    print(A-1, B)
elif T == u:
    print(A, B-1)


Failing test case input:
red elbt
0 -1
red

Expected output:
-1 -1


Actual output:
red elbt red
-1 -1


Fixed submission (verdict: Accepted):
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)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=(str,input().split())
a,b=(int,input().split())
u=str(input())

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


Failing test case input:
red bleu
12 1
red

Expected output:
11 1


Actual output:

Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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])))

Failing test case input:
red lbue
-1 2
red

Expected output:
-2 2


Actual output:

Fixed submission (verdict: Accepted):
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])))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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([str(a)+" "+str(b)])


Failing test case input:
red bule
-2 -2
red

Expected output:
-3 -2


Actual output:
-3 -2

Fixed submission (verdict: Accepted):
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(*[str(a)+" "+str(b)])

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
red blte
3 0
red

Expected output:
2 0


Actual output:
3 0


Fixed submission (verdict: Accepted):
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:
    print(A,B)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s:
  a -= 1
if u == t:
  b -= 1
print(a, b)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()
a,b = (int(x) for x in input().split())
u = input()

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

Failing test case input:
red blue
11 1
red

Expected output:
10 1


Actual output:
10


Fixed submission (verdict: Accepted):
s,t = input().split()
a,b = (int(x) for x in input().split())
u = input()

if u==s:
    print(a-1 ,b)
elif u==t:
    print(a ,b-1)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if s == u: print(str(a - 1) + ' ' + str(b))
if t == u: print(str(a) + ' ' + str(b - 1))
else:print(str(a) + ' ' + str(b))

Failing test case input:
red lbeu
7 2
red

Expected output:
6 2


Actual output:
6 2
7 2


Fixed submission (verdict: Accepted):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if s == u: print(str(a - 1) + ' ' + str(b))
if t == u: print(str(a) + ' ' + str(b - 1))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
red lbue
-1 3
red

Expected output:
-2 3


Actual output:
-1 2


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = map(int, input().split())
U = input()

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


Failing test case input:
red bule
-3 -2
red

Expected output:
-4 -2


Actual output:
(-3, -3)


Fixed submission (verdict: Accepted):

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

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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()


Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
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()

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=input().split()
a,b=map(int,input().split())
u=input()
if u == t:
    a -= 1
elif u == t:
    b -= 1
print(a,b)

Failing test case input:
red blve
1 4
red

Expected output:
0 4


Actual output:
1 4


Fixed submission (verdict: Accepted):
s,t=input().split()
a,b=map(int,input().split())
u=input()
if u == s:
    a -= 1
elif u == t:
    b -= 1
print(a,b)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = [int(n) for n in input().split()]
ans = {S:A, T:B}
U = input()
ans[U] -= 1
print([i for i in ans.values()])


Failing test case input:
red blue
11 1
red

Expected output:
10 1


Actual output:
[10, 1]


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = [int(n) for n in input().split()]
ans = {S:A, T:B}
U = input()
ans[U] -= 1
print(ans[S], ans[T])
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
    a-=1
else:
    b-=1
print(a+b)


Failing test case input:
red blte
3 -1
red

Expected output:
2 -1


Actual output:
1


Fixed submission (verdict: Accepted):
s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
    a-=1
else:
    b-=1
print(a,b)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r,b = input().split()
num1,num2 = map(int,input().split())
u = input()
a = 0
b = 0
if u == r:
    a = num1-1
else: 
    a = num1
if u == b:
    b = num2-1
else: 
    b = num2
print(a,b)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
r,b = input().split()
num1,num2 = map(int,input().split())
u = input()
a = num1
b = num2
if u == r:
    a = num1-1
else :
    b = num2-1
print(a,b)

Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S,T=input().split()
A,B=map(int,input().split())
U=input()

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

Failing test case input:
red vkeb
9 -1
red

Expected output:
8 -1


Actual output:
9 -2


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

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

Failing test case input:
red blve
0 6
red

Expected output:
-1 6


Actual output:
[-1, 6]


Fixed submission (verdict: Accepted):

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 )

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()
A,B = map(int,input().split())
U = input()
print((A-1),B if S == U else A,(B-1))

Failing test case input:
red lbue
-1 3
red

Expected output:
-2 3


Actual output:
-2 3 2


Fixed submission (verdict: Accepted):
S,T = input().split()
A,B = map(int,input().split())
U = input()
print(A-1,B) if S == U else print(A,B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
a, b = map(int, input().split())
u = input()

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


Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
(5, 4)


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

if s == u:
    print(a - 1, b)
else:
    print(a, b - 1)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
Ball = list(map(str, input().split()))
Num = list(map(int, input().split()))
OutputBall = input()
print((Num[0] - 1, Num[1]) if Ball[0] == OutputBall else (Num[0],
      Num[1] - 1))


Failing test case input:
red blue
7 1
red

Expected output:
6 1


Actual output:
(6, 1)


Fixed submission (verdict: Accepted):
Ball = list(map(str, input().split()))
Num = list(map(int, input().split()))
OutputBall = input()
Output = [Num[i] - 1 if Ball[i] == OutputBall else Num[i] for i in range(2)]
print(Output[0], Output[1])

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=input().split()
c,d=map(int,input().split())
print(c-1 if input()==a else d-1)

Failing test case input:
red laeu
9 2
red

Expected output:
8 2


Actual output:
8


Fixed submission (verdict: Accepted):
a,b=input().split()
c,d=map(int,input().split())
if input()==a:
    print(c-1,d)
else:
    print(c,d-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
a,b = map(int,input().split())
u = input()

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

else:
	print(b-1)

Failing test case input:
red bleu
10 0
red

Expected output:
9 0


Actual output:
9


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

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

else:
	print(a, b-1)

Problem: p02777
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
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)

Failing test case input:
red bkfu
4 0
red

Expected output:
3 0


Actual output:
2 4


Fixed submission (verdict: Accepted):
S,T=input().split()
A,B=map(int,input().split())
U=input()
if S==U:
    print(A-1,B)
else:
    print(A,B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
red bule
7 -3
red

Expected output:
6 -3


Actual output:
red bule 7 -3 red
6 -3


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
colors = list(map(str, input().split()))
numbers = list(map(int, input().split()))
target_color = input()

dictionary = {}
for index, color in enumerate(colors):
  dictionary[color] = numbers[index]
 
for color in dictionary.keys():
  print(str(dictionary[color]) + " ", end="")

Failing test case input:
red blue
2 1
red

Expected output:
1 1


Actual output:
2 1 

Fixed submission (verdict: Accepted):
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="")
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = list(map(str, input().split()))
a, b = list(map(int, input().split()))
u = input()

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

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:

Fixed submission (verdict: Accepted):
s, t = list(map(str, input().split()))
a, b = list(map(int, input().split()))
u = input()

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
list1 = input()
list2 = input()
list3 = input()
list1 = list1.split(' ')
list2 = list2.split(' ')
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)

Failing test case input:
red vkeb
9 -1
red

Expected output:
8 -1


Actual output:
9 -1


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
red blue
1 0
red

Expected output:
0 0


Actual output:
False


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
  print(a-1,b)
elif t==u:
  print(b-1,a)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
4 5


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
[N, T] = list(map(str, input().split()))
[A, B] = list(map(int, input().split()))
U = input()
print(N, T, A, B, U)
if (N == U):
    A -= 1
else:
    B -= 1
print("{} {}".format(A, B))
sys.stdout.flush

Failing test case input:
red blve
2 2
red

Expected output:
1 2


Actual output:
red blve 2 2 red
1 2


Fixed submission (verdict: Accepted):
import sys
[N, T] = list(map(str, input().split()))
[A, B] = list(map(int, input().split()))
U = input()
if (N == U):
    A -= 1
else:
    B -= 1
print("{} {}".format(A, B))
sys.stdout.flush

Problem: p02777
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s,t = input().split()
a,b = map(int,input().split())
u = input()
print(a,b-1 if u == t else a-1,b)

Failing test case input:
red alue
12 -3
red

Expected output:
11 -3


Actual output:
12 11 -3


Fixed submission (verdict: Accepted):
s,t = input().split()
a,b = map(int,input().split())
u = input()
print(a if u == t else a-1, end = " ")
print(b-1 if u == t else b)
Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S,T = input().split()
A,B = map(int,input().split())
U = input()

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

Failing test case input:
red bkfu
8 1
red

Expected output:
7 1


Actual output:
1


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

if(S==U):
  print("{} {}".format(A-1,B))
else:
  print("{} {}".format(A,B-1))

Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


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

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

print(A, B)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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="") 
  


Failing test case input:
red blue
5 2
red

Expected output:
4 2


Actual output:
['red', 'blue']
4 2 

Fixed submission (verdict: Accepted):
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="")

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split(' ')
a, b = map(int, input().split(' '))
u = input()

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


Failing test case input:
red buel
2 -2
red

Expected output:
1 -2


Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
    print(a-1)
else:
    print(b-1)


Failing test case input:
red bleu
17 0
red

Expected output:
16 0


Actual output:
16


Fixed submission (verdict: Accepted):
s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
    a-=1
else:
    b-=1
print(a,b)

Problem: p02777
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
red etlb
4 4
red

Expected output:
3 4


Actual output:
(3, 4)


Fixed submission (verdict: Accepted):
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)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))


Failing test case input:
red bkfu
16 0
red

Expected output:
15 0


Actual output:
15 16


Fixed submission (verdict: Accepted):
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))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = map(str,input().split())
A, B = map(int, input().split())
U = str(input())

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

print(A, B)

Failing test case input:
red beul
6 1
red

Expected output:
5 1


Actual output:
6 0


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

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

print(A, B)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()
a,b = map(int,input().split())
u = input()
if s == u:
  print(a-1,b)
if t == u:
  print(a,b-1)
else:
  print(a,b)

Failing test case input:
red blue
1 0
red

Expected output:
0 0


Actual output:
0 0
1 0


Fixed submission (verdict: Accepted):
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:
    print(a,b)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
 
S, T = input().split()
A, B = map(int, input().split())
U = input()
 
if S==U:
  print(A-1, B)
else:
  print(A, B-1)

Failing test case input:
red blve
1 2
red

Expected output:
0 2


Actual output:
1 1


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = map(int, input().split())
U = input()
 
if S==U:
  print(A-1, B)
else:
  print(A, B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = map(str, input().split())
A, B = map(int, input().split())
U = input(str)
if S == U:
  print(A-1, end=" ")
  print(B)
else:
  print (A, end=" ")
  print(B-1)

Failing test case input:
red blue
11 -2
red

Expected output:
10 -2


Actual output:
<class 'str'>10 -2


Fixed submission (verdict: Accepted):
S, T = map(str, input().split())
A, B = map(int, input().split())
U = str(input())
if S == U:
  print(A-1, end=" ")
  print(B)
else:
  print (A, end=" ")
  print(B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = map(str,input().split())
a,b = map(int,input().split())
u =map(str,input().split())

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

Failing test case input:
red beul
6 1
red

Expected output:
5 1


Actual output:
6 0


Fixed submission (verdict: Accepted):
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)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def resolve():
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()
 
    print(U)

    if S == U:
        A -= 1
    else:
        B -= 1
 
    print(str(A) + " " + str(B))
 
if __name__ == "__main__":
    resolve()

Failing test case input:
red bkfu
16 0
red

Expected output:
15 0


Actual output:
red
15 0


Fixed submission (verdict: Accepted):
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()

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

def main():

    

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

if __name__ == "__main__":
    main()


Failing test case input:
red blve
0 4
red

Expected output:
-1 4


Actual output:
0 3


Fixed submission (verdict: Accepted):
import sys

def main():

    

    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__":
    main()

Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

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

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

Failing test case input:
red blue
11 -3
red

Expected output:
10 -3


Actual output:
11 -4


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

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T=map(str,input().split())
A,B=map(int,input().split())
U=str(input())
print(A-1 if S==U else B-1)

Failing test case input:
red blue
7 0
red

Expected output:
6 0


Actual output:
6


Fixed submission (verdict: Accepted):
S,T=map(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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T=map(str, input().split())
A, B=map(int, input().split())
U=input()
if S==U:
  print(str(A-1)+' '+str(B))
elif T==U:
  print(str(S)+' '+str(B-1))

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
red 4


Fixed submission (verdict: Accepted):
S, T=map(str, input().split())
A, B=map(int, input().split())
U=input()
if S==U:
  print(str(A-1)+' '+str(B))
elif T==U:
  print(str(A)+' '+str(B-1))
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = input().split()
U = input().split()
S = str(S)
T = str(T)
A = int(A)
B = int(B)
U = str(U)


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

Failing test case input:
red lbte
0 3
red

Expected output:
-1 3


Actual output:
0 2


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = input().split()
U = str(input())
S = str(S)
T = str(T)
A = int(A)
B = int(B)


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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))


Failing test case input:
red blue
3 5
red

Expected output:
2 5


Actual output:
2　5


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

if S==U:
	print(str(A-1)+" "+str(B))
elif T==U :
	print(str(A)+" "+str(B-1))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=list(input().split())
a,b=list(map(int,input().split()))
u=input()
 
if u==s:
  print(a-1)
else:
  print(b-1)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
4


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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
red bkfu
4 0
red

Expected output:
3 0


Actual output:
red bkfu ['4', '0'] red 4 0
3 0


Fixed submission (verdict: Accepted):
S, T = input().split()
lis = list(input().split())
N1 = int(lis[0])
N2 = int(lis[1])
Z = input()


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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
red blue
-1 0
red

Expected output:
-2 0


Actual output:
-1 -1


Fixed submission (verdict: Accepted):
s,t = input().split()
a,b = input().split()
u = input()

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
red blue
3 2
red

Expected output:
2 2


Actual output:
3 1


Fixed submission (verdict: Accepted):
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:
    print(A,B)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
color = input()

kosuu = input()

trashc = input()

_ = 0

color = color.split()
kosuu = kosuu.split()
trashc = trashc.split()


while True:
  if(trashc[0] == color[_]):
    if(int(kosuu[_]) > 0):
    	answer = int(kosuu[_]) -1
    	break
    else:
      answer = 0
      break
      
  _= _+1
    
print(answer)

Failing test case input:
red blve
1 4
red

Expected output:
0 4


Actual output:
0


Fixed submission (verdict: Accepted):
color = input()

kosuu = input()

trashc = input()

_ = 0

color = color.split()
kosuu = kosuu.split()
trashc = trashc.split()


while True:
  if(trashc[0] == color[_]):
    kosuu[_] = int(kosuu[_]) -1
    break
      
  _= _+1
    
print(" ".join(map(str, kosuu)))

Problem: p02777
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
S,T = list(input().split())
A,B = list(map(int,input().split()))
U = input()

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

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
S,T = list(input().split())
A,B = list(map(int,input().split()))
U = input()

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))

Failing test case input:
red blue
-1 0
red

Expected output:
-2 0


Actual output:
0 -2


Fixed submission (verdict: Accepted):
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))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A,B = map(int,input().split())
U = input()
print(A,B)
if U == S:
  A -= 1
  print(A,B)
else:
  B -= 1
  print(A,B)
    

Failing test case input:
red lbue
-1 2
red

Expected output:
-2 2


Actual output:
-1 2
-2 2


Fixed submission (verdict: Accepted):
S, T = input().split()
A,B = map(int,input().split())
U = input()
if U == S:
  A -= 1
  print(A,B)
else:
  B -= 1
  print(A,B)

Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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)

Failing test case input:
red etlb
4 4
red

Expected output:
3 4


Actual output:
4 3


Fixed submission (verdict: Accepted):
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)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
tmp = input().split()
S = tmp[0]
T = tmp[1]
i = list(map(int, input().split()))
A = i[0]
B = i[1]
U = input()

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



Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
tmp = input().split()
S = tmp[0]
T = tmp[1]
i = list(map(int, input().split()))
A = i[0]
B = i[1]
U = input()

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = map(str,input().split())
X,Y = map(int,input().split())
Z = input()
if S==Z or T==Z:
    print(X+Y-1)
else:
    print(X+Y)


Failing test case input:
red blue
7 1
red

Expected output:
6 1


Actual output:
7


Fixed submission (verdict: Accepted):
S,T = map(str,input().split())
X,Y = map(int,input().split())
Z = input()
if S==Z:
  print(X-1,Y)
elif T==Z:
    print(X,Y-1)
else:
    print(X,Y)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l=input().split() 
n = list(map(int, input().split()))
t=input()
if l[0]==t:
    n[0]=n[0]-1
    print(n)
elif l[1]==t:
    n[1]=n[1]-1
    print(n)

Failing test case input:
red blue
1 0
red

Expected output:
0 0


Actual output:
[0, 0]


Fixed submission (verdict: Accepted):
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])

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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
else:
    lenT -= 1
print(lenS,lenT)

Failing test case input:
red bule
-2 -2
red

Expected output:
-3 -2


Actual output:
-2 -3


Fixed submission (verdict: Accepted):
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)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
M = [input() for i in range(3)]
M[0] = M[0].split()
s = str(M[0][0])
t = str(M[0][1])

M[1] = M[1].split()
a = int(M[1][0])
b = int(M[1][0])

U = str(M[2])

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

print(str(a) + ' ' + str(b))

Failing test case input:
red bulf
-2 -1
red

Expected output:
-3 -1


Actual output:
-3 -2


Fixed submission (verdict: Accepted):
M = [input() for i in range(3)]
M[0] = M[0].split()
s = str(M[0][0])
t = str(M[0][1])

M[1] = M[1].split()
a = int(M[1][0])
b = int(M[1][1])

U = str(M[2])


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

print(str(a) + ' ' + str(b))
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))



Failing test case input:
red bkfu
8 1
red

Expected output:
7 1


Actual output:
8 0


Fixed submission (verdict: Accepted):
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))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()
a,b= map(int,input().split())
u = input()
if u in s:
    print(a-1)
if u in t:
    print(b-1)

Failing test case input:
red blue
11 -3
red

Expected output:
10 -3


Actual output:
10


Fixed submission (verdict: Accepted):
s,t = input().split()
a,b= map(int,input().split())
u = input()
if u in s:
    print(a-1,b)
if u in t:
    print(a,b-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=input().split()
a,b=map(int,input().split())
u  =input()
if s==u:
	print(a-1)
else:
	print(b-1)

Failing test case input:
red blue
2 0
red

Expected output:
1 0


Actual output:
1


Fixed submission (verdict: Accepted):
s,t=input().split()
a,b=map(int,input().split())
u  =input()
if s==u:
	print(a-1,b)
else:
	print(a,b-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=map(str,input().split())
a,b=map(int,input().split())
u=str(input())

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

Failing test case input:
red bkfu
14 0
red

Expected output:
13 0


Actual output:

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

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

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



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


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





Failing test case input:
red bleu
10 0
red

Expected output:
9 0


Actual output:
0


Fixed submission (verdict: Accepted):



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


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


print('{} {}'.format(A, B))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = map(int, input().split())
U = input()

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


Failing test case input:
red blue
-4 -1
red

Expected output:
-5 -1


Actual output:
S-1 T


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

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