n=2
s=[""]*n
a=[0]*n
s[:]=input().split()
a[:]=map(int,input().split())
u=input()
for ii in range(n):
  if s[ii]==u:
    a[ii]-=1
    break
print(" ".join([str(ii) for ii in a])) n=2 n 2 s=[""]*n s [""]*n [""] "" n a=[0]*n a [0]*n [0] 0 n s[:]=input().split() s[:] s : input().split() ().split () input split a[:]=map(int,input().split()) a[:] a : map(int,input().split()) map int input().split() ().split () input split u=input() u input() input for ii in range(n):
  if s[ii]==u:
    a[ii]-=1
    break ii range(n) range n if s[ii]==u:
    a[ii]-=1
    break s[ii]==u s[ii] s ii u a[ii]-=1 a[ii] a ii 1 break str(ii) for ii in a for ii in a ii a for ii in a str(ii) str ii print(" ".join([str(ii) for ii in a])) print " ".join([str(ii) for ii in a]) " ".join " " join [str(ii) for ii in a] s=[""]*n [""]*n s n=2 2 n u=input() input() u a=[0]*n [0]*n a
n=2
s=[""]*n
a=[0]*n
s[:]=input().split()
a[:]=map(int,input().split())
u=input()
for ii in range(n):
  if s[ii]==u:
    a[ii]-=1
    break
print(" ".join([str(ii) for ii in a]))
