output_description: Print the integers contained in the boxes A, B, and C, in this order, with
  space in between.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      X Y Z
attempt: lun_luns = [1, 2, 3, 4, 5, 6, 7, 8, 9]
  k = int(input())
  index = 0
  while True:
      if len(lun_luns) >= k:
          break
      num = lun_luns.pop(index)
      lun_luns.insert(index, num)
      mod = num % 10
      n = num * 10
      if mod == 9:
          lun_luns.extend([n + mod - 1, n + mod])
      else:
          lun_luns.extend([n + mod - 1, n + mod, n + mod + 1])
      index += 1
  print(lun_luns[k - 1])
  
problem_description: Statement
  
  We have three boxes A, B, and C, each of which contains an integer.  
  Currently, the boxes A, B, and C contain the integers X, Y, and Z,
  respectively.  
  We will now do the operations below in order. Find the content of each box
  afterward.
  
    * Swap the contents of the boxes A and B
    * Swap the contents of the boxes A and C
samples: [{"input": "1 2 3", "output": "3 1 2\n    \n\nAfter the contents of the boxes A and B are swapped, A, B, and C contain 2, 1,\nand 3, respectively.  \nThen, after the contents of A and C are swapped, A, B, and C contain 3, 1, and\n2, respectively.\n\n* * *"}, {"input": "100 100 100", "output": "100 100 100\n    \n\n* * *"}, {"input": "41 59 31", "output": "31 41 59"}]