Problem:


Score : 100 points

Problem Statement

We have A balls with the string S written on each of them and B balls with the string T written on each of them.

From these balls, Takahashi chooses one with the string U written on it and throws it away.

Find the number of balls with the string S and balls with the string T that we have now.

Constraints

S, T, and U are strings consisting of lowercase English letters.

The lengths of S and T are each between 1 and 10 (inclusive).

S \not= T

S=U or T=U.

1 \leq A,B \leq 10

A and B are integers.

Input

Input is given from Standard Input in the following format:

S T
A B
U

Output

Print the answer, with space in between.

Sample Input 1

red blue
3 4
red

Sample Output 1

2 4

Takahashi chose a ball with red written on it and threw it away.
Now we have two balls with the string S and four balls with the string T.

Sample Input 2

red blue
5 5
blue

Sample Output 2

5 4

Takahashi chose a ball with blue written on it and threw it away.
Now we have five balls with the string S and four balls with the string T.



Sample input:
red blue
3 4
red


Sample output:
2 4

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print('x' * len(input()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
print('x'*len(S))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

s = input()
a = len(s)
print('x'*a)

Submission status: Wrong Answer

Solution code:
ri = lambda S: [int(v) for v in S.split()]
def rii(): return ri(input())

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

if U == "red":
    A -= 1
else:
    B -= 1

print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(input())
print("x"*len(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=input().split()
ST={}
ST[a], ST[b] = map(int, input().split())
ST[input()]-=1

for k,v in ST.items():
  print(v,end='')

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
red, blue= input().split()
r, b = [int (x) for x in input().split()]
s = input()
if s == "red":
    r = r - 1
else:
    b = b - 1
print(r, end=" ")
print(b)

Submission status: Wrong Answer

Solution code:
a, b = input().split()
na, nb = map(int, input().split())
c = input()
if c == "red":
  print(na - 1, nb)
else:
  print(na, nb - 1)

Submission status: Wrong Answer

Solution code:
a, b = input().split()
na, nb = map(int, input().split())
c = input()
print(na - 1, nb if c == "red" else na, nb - 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N_dict  = {i:0 for i in list(map(str,input().split()))}
N_List = list(map(int,input().split()))
ct = 0
for i in N_dict.keys():
    N_dict[i] = N_List[0]
    ct += 1

N_dict[str(input())] -= 1
print(" ".join(list(map(str,N_dict.values()))))

Submission status: Wrong Answer

Solution code:
N_dict  = {i:0 for i in list(map(str,input().split()))}
N_List = list(map(int,input().split()))
ct = 0
for i in N_dict.keys():
    N_dict[i] = N_List[0]
    ct += 1

N_dict[str(input())] -= 1
" ".join(list(map(str,N_dict.values())))

Submission status: Wrong Answer

Solution code:
N_dict  = {i:0 for i in list(map(str,input().split()))}
N_List = list(map(int,input().split()))
ct = 0
for i in N_dict.keys():
    N_dict[i] = N_List[0]
    ct += 1
print(N_dict[str(input())]-1)

Submission status: Wrong Answer

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

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

else:
    print(b-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
print("s" * len(S))

Submission status: Wrong Answer

Solution code:
l=list(map(str,input().split(' ')))
r,b=map(int,input().split(' '))
find=input()

if find=="red":
    r-=1
else:
    b-=1
print(str(r)+" "+str(b))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.buffer.readline
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.buffer.readline
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

s, t = input().split()
ab = LIST()
u = input()

if u == s:
    ab[0] -= 1
if u == t:
    ab[1] -= 1
    
ab = [str(i) for i in ab]
print(' '.join(ab))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S, T = "red", "blue"
A, B = 3, 4
U = "red"

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


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


calculate(S, T, A, B, U)

Submission status: Wrong Answer

Solution code:
S=input()
T=""
for i in range(len(S)):
  T+="x"
print(T)

Submission status: Wrong Answer

Solution code:
S,T=map(str, input().split())
A,B=map(int, input().split())
U=str(input())
if 'r' in S:
    print(A-1,B)
elif 'b' in T:
      print(A,B-1)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s,t,a,b,u=open(0).read().split()
if s==u:
    print(int(a)-1)
elif t==u:
    print(int(b)-1)

Submission status: Wrong Answer

Solution code:
s,t = map(str, input().split())
a,b = map(int, input().split())
u = str(input())
if s == "red" and u == "red":
  print(a-1 , b)
elif s == "blue" and u == "red" :
  print(a , b-1)
elif s == "red" and u == "blue":
  print(a , b-1)
elif s == "blue" and u == "blue" :
  print(a-1 , b)
elif t == "red" and u == "red":
  print(a , b-1)
elif t == "blue" and u == "red" :
  print(a-1 , b)
elif t == "red" and u == "blue":
  print(a-1 , b)
elif t == "blue" and u == "blue" :
  print(a , b-1)

Submission status: Wrong Answer

Solution code:
s,t = map(str, input().split())
a,b = map(int, input().split())
u = str(input())
if s == "red" and u == "red":
  print(a-1 , b)
elif s == "red" and u == "blue":
  print(a , b-1)
elif t == "blue" and u == "red" :
  print(a-1 , b)
elif t == "blue" and u == "blue" :
  print(a, b-1)

Submission status: Wrong Answer

Solution code:
s,t = map(str, input().split())
a,b = map(int, input().split())
u = str(input())
if s == "red" and u == "red":
  print(a-1 , b)
elif s == "blue" and u == "red" :
  print(b-1 , a)
elif s == "red" and u == "blue":
  print(b-1 , a)
elif s == "blue" and u == "blue" :
  print(a-1 , b)
elif t == "red" and u == "red":
  print(b-1 , a)
elif t == "blue" and u == "red" :
  print(a-1 , b)
elif t == "red" and u == "blue":
  print(a-1 , b)
elif t == "blue" and u == "blue" :
  print(b-1 , a)

Submission status: Wrong Answer

Solution code:
y = input()
x = [int(x) for x in input().split()]
y = input()
if (y == 'red'):
      print(x[0]-1,x[1])
else:
      print(x[0], x[1]-1)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque
#deque(l), pop(), append(x), popleft(), appendleft(x)
##listでqueの代用をするとO(N)の計算量がかかってしまうので注意
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reversed=True)  #二個目の要素で降順並び替え

    #N = int(input())
    S,T=input().split()

    A,B = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列
    s=input()
    if s=="red":
        print(A-1,B)
    else:
        print(A,B-1)





if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a,b=map(str,input().split())
c,d=map(int,input().split())
hashe={a:c,b:d}
e=input()
hashe[e]-=1
print(*hashe.values())

Submission status: Wrong Answer

Solution code:
a,b=map(str,input().split())
c,d=map(int,input().split())
hashed={a:c,b:d}
e=input()
hashed[e]-=1
print(*hashed.values())

Submission status: Wrong Answer

Solution code:
s=list(input().split())
a,b=map(int,input().split())
print(a,b-1 if s.index(input())==1 else a-1,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
d = defaultdict(int)
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
d[s] = a
d[t] = b
d[u] -= 1
for v in d.values():
  print(v, end=' ')

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
d = defaultdict(int)
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
d[s] = a
d[t] = b
d[u] -= 1
values = list(d.values())
print(values[0], values[1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
print(('x')*len(s))

Submission status: Wrong Answer

Solution code:
s=input()
print('x'*len(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
print('x' * len(S))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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(kosuu)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
S,T=list(input().split())
A,B=list(map(int,input().split()))
U=input()
D={}
D[S]=A
D[T]=B
D[U]-=1
print(*list(D.values()))

Submission status: Wrong Answer

Solution code:
S,T=list(input().split())
A,B=list(map(int,input().split()))
U=input()
D=dict()
D[S]=A
D[T]=B
D[U]-=1
print(*list(D.values()))

Submission status: Wrong Answer

Solution code:
l = {}
s, t = input().split()
a, b = map(int, input().split())
u = input()
print(a, b-1) if s==u else print(a-1, b)

Submission status: Wrong Answer

Solution code:
l = {}
s, t = map(str, input().split())
a, b = map(int, input().split())
l[s] = a
l[t] = b
u = input()
l[u] -= 1
a = list(l.values())
print("{} {}".format(a[0], a[1]))

Submission status: Wrong Answer

Solution code:
l = {}
s, t = map(str, input().split())
a, b = map(int, input().split())
l[s] = a
l[t] = b
u = input()
l[u] -= 1
a = list(map(str, l.values()))
print("{} {}".format(a[0], a[1]))

Submission status: Wrong Answer

Solution code:
l = {}
s, t = map(str, input().split())
a, b = map(int, input().split())
l[s] = a
l[t] = b
u = input()
l[u] -= 1
print(' '.join(list(map(str, l.values()))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s, t = input().split()
a, b = list(map(int, input().split()))
u = input()
if u == 'red':
    print(a-1, b)
else:
    print(a, b-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict

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

d = defaultdict(int)

d[s] = a
d[t] = b
d[u] -=1

print(*d.values(), sep=" ")

Submission status: Wrong Answer

Solution code:
from collections import defaultdict

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

d = defaultdict(int)

d[s] = a
d[t] = b
d[u] -= 1

print(*d.values())

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
s,t=input().split()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

Solution code:
S,T = input().split()
A,B = map(int,input().split())
d = {S:A,T:B}
U = input()
d[U] = d[U]-1
for i in d.values():
    print (i,end=" ")

Submission status: Wrong Answer

Solution code:
S = input()
ans = []

for i in range(len(S)):
    ans.append("x")

print("".join(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a = dict(
  zip(
    list(input().split()),
    list(map(int, input().split()))
  )
)
U = input()
a[U] = a[U]-1

print(*list(a.values()))

Submission status: Wrong Answer

Solution code:
a = dict(
  zip(
    list(input().split()),
    list(map(int, input().split()))
  )
)
U = input()
a[U] = a[U]-1

# アンパックする
print(*a.values())

Submission status: Wrong Answer

Solution code:
a = dict(
  zip(
    list(input().split()),
    list(map(int, input().split()))
  )
)
U = input()
a[U] = a[U]-1

print(list(a.values()))

Submission status: Wrong Answer

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

print(A+B-1)

Submission status: Wrong Answer

Solution code:
list=list(input())
for s in list:
    s='x'
print(''.join(list))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
fs, bs = map(str,input().split())
ci, di = map(int,input().split())
es = str(input())

if es == fs:
  ca = ci - 1
  print(ca,di)
elif es == bs:
  da = di -1
  print(da,ci)

Submission status: Wrong Answer

Solution code:
fs, bs = map(str,input().split())
ci, di = map(int,input().split())
es = str(input())

if es == fs:
  ca = ci - 1
  print(ca, di)
elif es == bs:
  da = di -1
  print(da, ci)

Submission status: Wrong Answer

Solution code:
fs, bs = map(str,input().split())
ci, di = map(int,input().split())
es = str(input())

if es == fs:
  ca = ci - 1
  print(ca)
elif es == bs:
  da = di -1
  print(da)

Submission status: Wrong Answer

Solution code:
import sys
s, t = map(str, sys.stdin.readline().split())
a, b = map(int, sys.stdin.readline().split())
u = sys.stdin.readline()
if s == u:
  print(a-1, b)
else:
  print(a, b-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
#from itertools import combinations # (string,3) 3回
#from collections import deque
#import collections.defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    s,t = map(str,input().split())
    a,b = readInts()
    m = input()
    if m == 'red':
        print(a-1,b)
    else:
        print(a,b-1)
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
s,t = list(input().split())
a,b = list(map(int, input().split()))

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

Submission status: Wrong Answer

Solution code:
#入力値を格納
s,t = map(str,input().split())
a,b = map(int,input().split())
u = input()

#個数を計算
if s == t:
    a = a - 1
else:
    b = b - 1

#結果を表示
print("{} {}".format(a,b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
class atcoder:
    S=input()
    LEN=len(S)
    print(LEN*'x')

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.buffer.readline
#from collections import defaultdict
#d = defaultdict(int)
#import fractions
#import math
#import collections
#from collections import deque
#from bisect import bisect_left
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
#import itertools
S,T = input().split()
A,B = map(int,input().split())
U = input()
if S == U:
    print(A-1,B)
else:
    print(A,B-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# cook your dish here
N,K = map(str, input().split())
r , b = map(int, input().split())
p = input()
if p == "red":
    print(r-1,b)
    exit()
if p=="blue":
    print(r,b-1)
    exit()

Submission status: Wrong Answer

Solution code:
# cook your dish here
N,K = map(str, input().split())
r , b = map(int, input().split())
p = input()
if p == "red":
    print(r-1,b)
else:
    print(r,b-1)

Submission status: Wrong Answer

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

print("2 4")

# if s == u:
#     a-=1
#     print(f'{a} {b}')
# else:
#     b-=1
#     print(f'{a} {b}')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

for key in dic.keys():
    print(dic[key],end='')
    print(' ',end='')

Submission status: Wrong Answer

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

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

for key in dic.keys():
    print(str(dic[key])+' ',end='')

Submission status: Wrong Answer

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

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

for key in dic.keys():
    print(str(dic[key])+' ',end='')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution 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('{} {}'.format(A,B))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Balls = {}
Balls[S] = A
Balls[T] = B
Balls[U] -= 1

print(*Balls.values())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
d = {key:value for key, value in zip(input().split(), map(int, input().split()))}
d[input()] -= 1
print(' '.join(map(str, d.values())))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

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