output_description: Print the answer, with space in between.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S T
      A B
      U
attempt: import sys
  
  Ball = list(map(str, input().split()))
  Quantity = list(map(int, input().split()))
  U = str(input())
  
  S = Ball[0]
  T = Ball[1]
  A = Quantity[0]
  B = Quantity[1]
  
  if not 1 <= len(S) or not len(S) <= 10:
      print("error:S_length")
      sys.exit()
  if not 1 <= len(T) or not len(T) <= 10:
      print("error:T_length")
      sys.exit()
  if S == T:
      print("error:S==T")
      sys.exit()
  if S != U and T != U:
      print("error:S=U or S=T")
      sys.exit()
  if not 1 <= A or not B <= 10:
      print("error:A,B")
      sys.exit()
  
  if U == S:
      A -= 1
  if U == T:
      B -= 1
  print(A, B)
  
problem_description: 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.
samples: [{"input": "red blue\n    3 4\n    red", "output": "2 4\n    \n\nTakahashi chose a ball with `red` written on it and threw it away. Now we have\ntwo balls with the string S and four balls with the string T.\n\n* * *"}, {"input": "red blue\n    5 5\n    blue", "output": "5 4\n    \n\nTakahashi chose a ball with `blue` written on it and threw it away. Now we\nhave five balls with the string S and four balls with the string T."}]