output_description: Print the integer obtained by replacing each occurrence of `1` with `9` and
  each occurrence of `9` with `1` in n.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      n
attempt: n = int(input())
  n_100 = n // 100
  n_10 = (n - n_100 * 100) // 10
  n_1 = n - n_100 * 100 - n_10 * 10
  if n_100 == 1:
      ans_100 = 9
  elif n_100 == 9:
      ans_100 = 1
  else:
      ans_100 = n_100
  if n_10 == 1:
      ans_10 = 9
  elif n_10 == 9:
      ans_10 = 1
  else:
      ans_10 = n_10
  if n_1 == 1:
      ans_1 = 9
  elif n_1 == 9:
      ans_1 = 1
  else:
      ans_1 = n_1
  ans = ans_100 * 100 + ans_10 * 10 + ans_1
  print(ans)
  
problem_description: Statement
  
  Cat Snuke is learning to write characters. Today, he practiced writing digits
  `1` and `9`, but he did it the other way around.
  
  You are given a three-digit integer n written by Snuke. Print the integer
  obtained by replacing each digit `1` with `9` and each digit `9` with `1` in
  n.
samples: [{"input": "119", "output": "991\n    \n\nReplace the `9` in the ones place with `1`, the `1` in the tens place with `9`\nand the `1` in the hundreds place with `9`. The answer is `991`.\n\n* * *"}, {"input": "999", "output": "111"}]