output_description: If the length of S is 2, print S as is; if the length is 3, print S after
  reversing it.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: args = str(input())
  args = args.split(" ")
  a = int(args[0])
  b = int(args[1])
  k = int(args[2])
  
  turn = 0
  for i in range(k):
      if turn == 0:
          if a > 0:
              if a % 2 == 1:
                  a = a - 1
          if a > 0:
              g = a / 2
              a = a - g
              b = b + g
          turn = 1
      elif turn == 1:
          if b > 0:
              if b % 2 == 1:
                  b = b - 1
          if b > 0:
              g = b / 2
              b = b - g
              a = a + g
          turn = 0
  
  print(int(a), int(b))
  
problem_description: Statement
  
  You are given a string S of length 2 or 3 consisting of lowercase English
  letters. If the length of the string is 2, print it as is; if the length is 3,
  print the string after reversing it.
samples: [{"input": "abc", "output": "cba\n    \n\nAs the length of S is 3, we print it after reversing it.\n\n* * *"}, {"input": "ac", "output": "ac\n    \n\nAs the length of S is 2, we print it as is."}]