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=input().split()
a=int(a)
b=int(b)
u=input()
dict={}
dict[s]=a
dict[t]=b

dict[u]-=1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if U == 'red':
    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 = input()

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

Submission status: Wrong Answer

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

main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_S, _T = input().split()
A, B = list(map(lambda x:int(x), input().split()))
U = input()


if U == A:
    is_type_A = True
else:
    is_type_A = False

if is_type_A:
    print(A - 1, B)
else:
    print(A, B-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = input().split()
c, d = map(int, input().split())
e = input()
if a == e:
    print("{} {}".format(c-1,d))
if b == e:
    print("{} {}".format(c-1,d))

Submission status: Wrong Answer

Solution code:
def main():

    s,t = map(str, input().split())

    a,b = map(int, input().split())

    u = str(input())

    if u == 'red':
        print(str(a-1), str(b))
    elif u == 'blue':
        print(str(a), str(b-1))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():

    s,t = map(str, input().split())

    a,b = map(int, input().split())

    u = str(input())

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return map(int,input().split())
def LI(): return list(map(int,input().split()))

import numpy as np
def main():
    S,T = input().split()
    A,B = MAP()
    U = input()

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

    return

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s=input()
ans=''
for _ in s:
  ans+='x'
print(ans)

Submission status: Wrong Answer

Solution code:
name_a,name_b=(x for x in input().split())
a_count,b_count=(int(x) for x in input().split())
fetch_color=input()
 
if fetch_color==name_a:
  a_coount = a_count-1
elif fetch_color==name_b:
  b_count = b_count-1
print(a_count,b_count)

Submission status: Wrong Answer

Solution code:
name  = list(map(str, input().split()))
number=list(map(int, input().split()))
dash  =input()
if name[0] == dash:
   number[0]=number[0]-1
print(number[0],number[1])

Submission status: Wrong Answer

Solution code:
name  = list(map(str, input().split()))
number=list(map(int, input().split()))
dash  =input()
if name[0] == dash:
   number[0]=number[0]-1
print(number[0] , number[1])

Submission status: Wrong Answer

Solution code:
name  = list(map(str, input().split()))
number=list(map(int, input().split()))
dash  =input()
if name[0] == dash:
   number[0]=number[0]-1
print(number)

Submission status: Wrong Answer

Solution code:
name  = list(map(str, input().split()))
number=list(map(int, input().split()))
dash  =input()
print(dash)
if name[0] == dash:
   number[0]=number[0]-1
print(number)

Submission status: Wrong Answer

Solution code:
s, t = input().split()
a, b = map(int, input().split())
c = input()
if c == a: 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 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=str(input)

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

Submission status: Wrong Answer

Solution 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:
	print(str(A-1)+" "+str(B))
else :
	print(str(A)+" "+str(B-1))

Submission status: Wrong Answer

Solution code:
a = input().split()
c, d = map(int, input().split())
e = input()

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

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

Submission status: Wrong Answer

Solution code:
D={s:x for s,x in zip(input().split(),list(map(int,input().split())))};D[input()]-=1;[print(D[s],end=" ")for s in D]

Submission status: Wrong Answer

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

h1 = {}
h1[s] = a
h1[t] = b

h1[u] = h1[u] - 1

ans = ''
for key, value in h1.items():
    ans = ans + str(value) + ' '

ans = ans[:-1]
print(ans)

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

if input()=="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()

if u==s:
  a=a-1

if u==t:
  b=b-1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(input())
n = len(a)
for i in range(n):
  a[i] = "x"
l = "".join(a)
print(l)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

balls = {s:a, t:b}

for key in balls:
    if key == u:
        balls[key] = balls[key] - 1
        
listBalls = list(balls.values())
print(listBalls[0], listBalls[1])

Submission status: Wrong Answer

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

balls = {s:a, t:b}

for key in balls:
    if key == u:
        balls[key] = balls[key] - 1

listBalls = list(balls.values())

print('{} {}'.format(listBalls[0], listBalls[1]))

Submission status: Wrong Answer

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

balls = {s:a, t:b}

for key in balls:
    if key == u:
        balls[key] = balls[key] - 1

listBalls = list(balls.values())
print('{} {}'.format(listBalls[0], listBalls[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:
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()

Submission status: Wrong Answer

Solution code:
def resolve():
    S, T = input().split()
    A, B = map(int, input().split())
    U = input().split()
 
    if S == U:
        A -= 1
    else:
        B -= 1
 
    print(str(A) + " " + str(B))
 
if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S, T = input().split()
A, B = map(int, input().split())
if S == input():
  A -=1
else:
  B -=1
print("{0}" "{1}".format(A, B))

Submission status: Wrong Answer

Solution code:
dic_lst={}
lst_a=input().split()
lst_b=list(map(int,input().split()))
wd=input()
for i in range(2):
    dic_lst[lst_a[i]]=lst_b[i]
if wd in dic_lst.keys():
    dic_lst[wd]-=1
print(*dic_lst.values())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
items = {}
colors = input().split(" ")
nums = input().split(" ")
remove = input()

for i in range(len(colors)):
    items[colors[i]] = int(nums[i] )

items[remove] -= 1

for x in items.keys():
    print(str(items[x]) + " ", end="")

Submission status: Wrong Answer

Solution code:
items = {}
colors = input().split(" ")
nums = input().split(" ")
remove = input()

for i in range(len(colors)):
    items[colors[i]] = int(nums[i] )

items[remove] -= 1

for x in items.keys():
    print(x + " ", end="")

Submission status: Wrong Answer

Solution code:
t=list(input())
n=int((len(t)+1)//2)
p=0
for i in range(1,n):
    for j in range(1,i):
        if t[2*i]==t[2*j]:
            p+=1
if p>0:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
m="S"
n=len(m)
print("x"*7)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()
A = sorted(list(map(int,input().split())))
ans = "YES"
for i in range (1,len(A)):
    if A[i] == A[i-1]:
        ans = "NO"
print(ans)

Submission status: Wrong Answer

Solution code:
a = list(map(str,input().split()))
b = list(map(int,input().split()))
c = input()

b[a.index(c)] -= 1

print(b)

Submission status: Wrong Answer

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

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

print(a,b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = input()

l = len(S)
K = ""
for i in range(l):
  K += "x"
  
print(K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
dic = {}
for i, j in zip(input().split(), list(map(int, input().split()))):
  dic[i] = j
dic[input()] -= 1
print(*dic.values())

Submission status: Wrong Answer

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

d = {s: a, t: b}
d[u] = d[u] - 1
print(' '.join(map(str, d.values())))

Submission status: Wrong Answer

Solution code:
from sys import stdin


def get_result(data):
    return 'x' * len(data)

if __name__ == '__main__':
    data = input()
    result = get_result(data)
    print(result)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc154/tasks/abc154_a

s, t = input().split()
a, b = [int(x) for x in input().split()]
u = input()
d = {}
d[s] = a
d[t] = b
d[u] -= 1
print(" ".join(list(map(str, list(d.values())))))

Submission status: Wrong Answer

Solution code:
S, T = 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:
ball = input().split()
number = list(map(int, input().split()))
U = input()

if U == ball[0]:
    number[0] -= 1
else:
    number[1] -= 1
print(number)

Submission status: Wrong Answer

Solution code:
l=input().split()
for i in l:
  if l.count(i)!=1:
    print("NO")
    exit(0)
print("YES")

Submission status: Wrong Answer

Solution code:
S,T = map(str,input().split())
A,B = map(int,input().split())
U = str(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 = input().split()
U = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
list1 = input()
list1 = list1.split(' ')
list2 = input()
list2 = list2.split(' ')
list3 = input()
S = list1[0]
T = list1[1]
lenS = int(list2[0])
lenT = int(list2[1])
select = list3[0]
if select == S:
    lenS -= 1
elif select == T:
    lenT -= 1
print(lenS,lenT)

Submission status: Wrong Answer

Solution code:
list1 = input()
list1 = list1.split(' ')
list2 = input()
list2 = list2.split(' ')
list3 = input()
S = list1[0]
T = list1[1]
lenS = int(list2[0])
lenT = int(list2[1])
select = list3[0]
if select == S:
    lenS -= 1
else:
    lenT -= 1
print(lenS,lenT)

Submission status: Wrong Answer

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

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:
a = [input().split() for i in range(3)]
b = list(map(int,  a[1]))
if a[0][0] ==a[2][0]:
    b[0] -=1
if a[0][1] ==a[2][0]:
    b[1]  -=1
b = list(map(str,  b))
' '.join(b)

Submission status: Wrong Answer

Solution code:
ball1,ball2=map(str,input().split())
c1,c2=map(int,input().split())
x=input()
print(c1-1,c2 if x==ball1 else c1,c2-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if U == "red":
    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 = input("")

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

print(A, B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = input()
char_list = list(S)
new_list=[]
for char  in char_list:
    char = "x"
    new_list.append(char)
output = "".join(new_list)
print(output)

Submission status: Wrong Answer

Solution code:
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]
  if color == target_color:
    dictionary[color] = dictionary[color] - 1
  
 
for color in dictionary.keys():
  print(str(dictionary[color]) + " ", end="")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
name = input().split()
n1 = name[0]; n2 = name[1]
lnum = input().split()
lnum1 = int(lnum[0]); lnum2 = int(lnum[1])
l1 = [n1, lnum1]
l2 = [n2, lnum2]
choosen = input()
print(l1)
print(l2)

if choosen == n1:
    print(l1[1]-1, end=" ")
    print(l2[1])
if choosen == n2:
    print(l1[1], end=" ")
    print(l2[1]-1)

Submission status: Wrong Answer

Solution code:
name = input().split()
n1 = name[0]; n2 = name[1]
lnum = input().split()
lnum1 = int(lnum[0]); lnum2 = int(lnum[1])
l1 = [n1, lnum1]
l2 = [n2, lnum2]
choosen = input()
if choosen == n1:
    print(l1[1]-1, end=" ")
    print(l2[1])
if choosen == n2:
    print(l2[1]-1, end=" ")
    print(l1[1])

Submission status: Wrong Answer

Solution code:
name = input().split()
n1 = name[0]; n2 = name[1]
lnum = input().split()
lnum1 = int(lnum[0]); lnum2 = int(lnum[1])
l1 = [n1, lnum1]
l2 = [n2, lnum2]
choosen = input()
if choosen == n1:
    print(l1[1]-1, end=" ")
    print(l2[1])
if choosen == n2:
    print(l2[1]-1, end="")
    print(l1[1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print('1')

Submission status: Wrong Answer

Solution code:
color=input().split()
x,y=map(int,input().split())
color2=input()

if color2==color[0]:
    print(x-1)
else:
    print(y-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
moji = list(map(str,input().split()))
kazu = list(map(int,input().split()))
U = input()
print(kazu[moji.index(U)] -1)

Submission status: Wrong Answer

Solution code:
s,t = map(str,input().split())
a,b = map(int,input().split())
u = input()
if u=='red' and s=='red': print(a-1,b)
elif u=='red' and t=='red': print(a,b-1)
elif u=='blue' and s=='blue': print(a-1,b)
elif u=='blue' and t=='blue': 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=='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 S == U:
  print(str(A-1) + '' + str(B))
else:
  print(str(A) + '' + str(B-1))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
"""
n=int(input())

listA=[]

for i in range(n):
    try:
        listA.append(list(map(int, input().split())))
        #listA<-[1,2,2,3,1]
        #print(listA)
        #ここに逐次処理を書けばいいと思う。
    except:
        break;
        #または、quit(),os.exit()をして止める。

print(listA)

"""

#n=int(input())

listA=[]

try:
    listA = list(input().split())
    #listA<-[1,2,2,3,1]
    #print(listA)
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。


try:
    listB=list(map(int,input().split()))
    #listA<-[1,2,2,3,1]
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。

dic = {}

for i, j in zip(listA, listB):
    dic[i] = j

name=input()

dic[name]=dic[name]-1

N=len(listA)

j=0

for i in dic.values():
    if j!=N-1:
        print(i, end=" ")
    else:
        print(i, end="")
    j+=1

Submission status: Wrong Answer

Solution code:
"""
n=int(input())

listA=[]

for i in range(n):
    try:
        listA.append(list(map(int, input().split())))
        #listA<-[1,2,2,3,1]
        #print(listA)
        #ここに逐次処理を書けばいいと思う。
    except:
        break;
        #または、quit(),os.exit()をして止める。

print(listA)

"""

#n=int(input())

listA=[]

try:
    listA = list(input().split())
    #listA<-[1,2,2,3,1]
    #print(listA)
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。


try:
    listB=list(map(int,input().split()))
    #listA<-[1,2,2,3,1]
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。

dic = {}

for i, j in zip(listA, listB):
    dic[i] = j

name=input()

dic[name]=dic[name]-1

N=len(listA)

j=0

for i in dic.values():
    if j!=N-1:
        print(i, end=" ")
    else:
        print(i, end="")
    j+=1

Submission status: Wrong Answer

Solution code:
"""
n=int(input())

listA=[]

for i in range(n):
    try:
        listA.append(list(map(int, input().split())))
        #listA<-[1,2,2,3,1]
        #print(listA)
        #ここに逐次処理を書けばいいと思う。
    except:
        break;
        #または、quit(),os.exit()をして止める。

print(listA)

"""

#n=int(input())

listA=[]

try:
    listA = list(input().split())
    #listA<-[1,2,2,3,1]
    #print(listA)
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。


try:
    listB=list(map(int,input().split()))
    #listA<-[1,2,2,3,1]
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。

dic = {}

for i, j in zip(listA, listB):
    dic[i] = j

name=input()

dic[name]=dic[name]-1

N=len(listA)

j=0

for i in dic.values():
    if j!=N-1:
        print(i, end=" ")
    else:
        print(i)

    j+=1

Submission status: Wrong Answer

Solution code:
"""
n=int(input())

listA=[]

for i in range(n):
    try:
        listA.append(list(map(int, input().split())))
        #listA<-[1,2,2,3,1]
        #print(listA)
        #ここに逐次処理を書けばいいと思う。
    except:
        break;
        #または、quit(),os.exit()をして止める。

print(listA)

"""

#n=int(input())

listA=[]

try:
    listA = list(input().split())
    #listA<-[1,2,2,3,1]
    #print(listA)
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。


try:
    listB=list(map(int,input().split()))
    #listA<-[1,2,2,3,1]
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。

dic = {}

for i, j in zip(listA, listB):
    dic[i] = j

name=input()

dic[name]=dic[name]-1

for i in dic.values():
    print(i, end=" ")

Submission status: Wrong Answer

Solution code:
"""
n=int(input())

listA=[]

for i in range(n):
    try:
        listA.append(list(map(int, input().split())))
        #listA<-[1,2,2,3,1]
        #print(listA)
        #ここに逐次処理を書けばいいと思う。
    except:
        break;
        #または、quit(),os.exit()をして止める。

print(listA)

"""

#n=int(input())

listA=[]

try:
    listA = list(input().split())
    #listA<-[1,2,2,3,1]
    #print(listA)
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。


try:
    listB=list(map(int,input().split()))
    #listA<-[1,2,2,3,1]
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。

dic = {}

for i, j in zip(listA, listB):
    dic[i] = j

name=input()

dic[name]=dic[name]-1

print(dic)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
b = input().split()
a = list(map(int, input().split()))
c = {b[i]: a[i] for i in range(len(b))}
d = input()
for i, j in c.items():
    print(j - 1 if i == d else j, end=" ")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
color = input().split() #s_1 s_2を分割して取得し、sに値を入れる
count = list(map(int, input().split())) #i_1 i_2を取得し、iに値を入れる
select_color = input() # 玉の色を選択

for i in range(0, 1):
    if select_color == color[i]:
        count[i] -= 1
print(count[0], count[1]) #残りの個数を出力

Submission status: Wrong Answer

Solution code:
s, t = input().split()
a, b = 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())
U = input()
print(A - 1, B) if "red" == U else print(A, B - 1)

Submission status: Wrong Answer

Solution code:
d = dict(zip(input().split(), map(int, input().split())))
d[input()] -= 1
print(*d.values())

Submission status: Wrong Answer

Solution code:
s=input()
ans=str()
for i in range(len(s)):
    ans+="x"

print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ans=str()
for i in range(len(s)):
    ans+="x"

Submission status: Wrong Answer

Solution code:
s, t = list(input().split())
s_num, t_num = map(int, input().split())
bad_string = input()

if bad_string == s:
    print(s_num - 1, t_num)
elif bad_string == t_num:
    print(s_num, t_num - 1)
else:
    print(s_num, t_num)

Submission status: Wrong Answer

Solution code:
import sys
import collections


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    d = collections.defaultdict(int)
    st = list(map(str, str(input().rstrip('\n')).split()))
    ab = list(map(str, str(input().rstrip('\n')).split()))
    for s, v in zip(st, ab):
        d[s] = int(v)
    d[str(input().rstrip('\n'))] -= 1
    print(" ".join(list(map(str, d.values()))))


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

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

print(a, b, sep='\t')

Submission status: Wrong Answer

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

if u == "red":
    a -= 1
else:
    b -= 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print("enter S and T value")
S, T = input().split()
print("enter A and B value")
A, B = map(int, input().split())
print("enter U value")
U = input()
if S==U:
  print("{} {}".format(A-1,B))
elif T==U:
  print("{} {}".format(A,B-1))