Problem:
 Score : 100 points    Problem 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 .      Constraints  111 \leq n \leq 999  n is an integer consisting of digits 1 and 9 .         Input Input is given from Standard Input in the following format:  n       Output Print the integer obtained by replacing each occurrence of 1 with 9 and each occurrence of 9 with 1 in n .        Sample Input 1 119      Sample Output 1 991  Replace the 9 in the ones place with 1 , the 1 in the tens place with 9 and the 1 in the hundreds place with 9 . The answer is 991 .       Sample Input 2 999      Sample Output 2 111

Solution (Python):

n = input()
a = ""
for i in n:
    if i == "1":a += "9"
    elif i == "9":a += "1"
print(int(a))

Solution (Python):
n = int(input())
print(1110-n)

Solution (Python):
l = list(input())

for i in range(len(l)):
    if l[i] == '1':
        l[i] = '9'
    else:
        l[i] = '1'

ans = l[0] + l[1] + l[2]
print(ans)

Solution (Python):
n=list(str(input()))
for i in range(len(n)):
    if n[i]=='1':
        n[i]='9'
    else:
        n[i]='1'
print(int(n[0])*100+int(n[1])*10+int(n[2]))

Solution (Python):
n = input()
for i in n:
    if i == "9":
        print(1,end="")
    else:
        print(9,end="")

Solution (Python):
print(''.join(['1' if i == '9' else '9' for i in input()]))

Solution (Python):
n=input()
n = n.replace('1','a')
n = n.replace('9','b')
n = n.replace('a','9')
n = n.replace('b','1')
print(n)

Solution (Python):
n = input()
for i in n:
    if i == '1':
        print('9', end='')
    elif i == '9':
        print('1', end='')

Solution (Python):
print(input().rstrip().replace("1","a").replace("9","1").replace("a","9"))

Solution (Python):
N = list(input())

r = []

for i in N:
    if i == '1':
        r.append('9')
    else:
        r.append('1')

print(''.join(r))

Solution (Python):
s = str(input())
list_s = list(s)

for i in range(0,3):
    if list_s[i] == "9":
        list_s[i] = "1"
    else:
        list_s[i] = "9"
print("".join(list_s))

Solution (Python):
str1 = raw_input().replace("\n", "")
str2 = str1.replace("1", "A").replace("9", "B")
str3 = str2.replace("A", "9").replace("B", "1")
print str3

Solution (Python):
n=input()
n=list(n)
for i in range(0,len(n)):
    if n[i]=='1':
        n[i]='9'
    else:
        n[i]='1'
print(*n,sep='')

Solution (Python):
n = str(input())
n = n.replace('1','2')
n = n.replace('9','1')
n = n.replace('2','9')

print(n)

Solution (Python):
from sys import stdin

s = stdin.readline().rstrip()

ans = ''
for i in range(len(s)):
    if (s[i] == '1'):
        ans += '9'
    else:
        ans += '1'

print(ans)

Solution (Python):
print(int(input().replace("1", "i").replace("9", "1").replace("i", "9")))

Solution (Python):
n=int(input())

a=n//100
b=(n-a*100)//10
c=n%10

if a==1:
    a=9
elif a==9:
    a=1
    
if b==1:
    b=9
elif b==9:
    b=1
    
if c==1:
    c=9
elif c==9:
    c=1
    
print(a*100+b*10+c)

Solution (Python):
n = input()
answer = ""
for i in n:
    if i == "1":
        answer += "9"
    elif i == "9":
        answer += "1"

print(answer)

Solution (Python):
n = int(input())
ans = 0

if n // 100 == 1:
    n -= 100
    ans += 100*9
else:
    n -= 900
    ans+= 100
if n // 10 == 1:
    n -= 10
    ans += 10*9
else:
    n -= 90
    ans += 10
if n // 1 == 1:
    ans += 9
else:
    ans += 1

print(ans)

Solution (Python):
n = input()
ans = ''
for i in n:
    if i == '9':
        ans += '1'
        continue
    elif i == '1':
        ans += '9'
        continue
    ans += i
    
print(ans)

Solution (Python):
n = input()
r = ''.join(['9' if i == '1' else '1' for i in n])
print(r)

Solution (Python):
s = raw_input()

num = int(s)

ans = 1110-num

print ans

Solution (Python):

n = int(input())

n_tmp = n
ans = 0
for i in range(3):
    if n_tmp % 10 == 1: ans += 9 * (10 ** i)
    elif n_tmp % 10 == 9: ans += 1 * (10 ** i)
    else: ans += (n_tmp % 10) * (10 ** i)
    if i > 2: break
    n_tmp = n_tmp // 10

print(ans)

Solution (Python):
n = input()

ans = ""
for i in n:
	if i == "1":
		ans += "9"
	elif i == "9":
		ans += "1"
	else:
		ans += i

print(ans)

Solution (Python):
x = input()
x = x.replace("9","x").replace("1","9")
x = x.replace("x","1")
print(x)

Solution (Python):
import sys
Input = sys.stdin.readline

n = [c for c in Input()]

for i in range(len(n)):
    if n[i] == "1":
        n[i] = "9"
    elif n[i] == "9":
        n[i] = "1"

print("".join(n))

Solution (Python):
n = input()
new_str = ""
for i in range(3):
    if n[i] == '1':
        new_str += "9"
    elif n[i] == '9':
        new_str += "1"
    else:
        new_str += n[i]
print(new_str)

Solution (Python):
print(1110-int(input()))

Solution (Python):
s = input()
print(s.translate(str.maketrans({'1': '9', '9': '1'})))

Solution (Python):
n = input()
result = "".join(["1" if x == "9" else "9" for x in n])
print(result)

Solution (Python):
x = input()
ans = ''
for c in x:
    if c == '1':
        ans += '9'
    elif c == '9':
        ans += '1'
    else:
        ans += c

print(ans)

Solution (Python):
n = input()
print(''.join('1' if c == '9' else '9' for c in n))

Solution (Python):
n = input()
s = ""
for a in n:
    if a == '9':
        s += '1'
    elif a == '1':
        s += '9'
    else:
        s += a

print(s)

Solution (Python):
n = int(input())
print(1110 - n)

Solution (Python):


n = input()

for i in n:
    if i == '9':
        print('1', end='')
    else:
        print('9', end='')
print()

Solution (Python):
s=raw_input()
ans=""
for x in s:
	if x=="1": ans+="9"
	elif x=="9": ans+="1"
print ans

Solution (Python):
def swap(char_str):
    ans = ''
    for i in char_str:
        if i == '9':
            ans += '1'
        if i == '1':
            ans += '9'
    return ans

n = input()
print(swap(n))

Solution (Python):
n_list = list(input())

ans = []

for n in n_list:
    if n == "9":
        ans.append("1")
    elif n == "1":
        ans.append("9")
    else:
        ans.append(n)

ans = int("".join(ans))

print(ans)

Solution (Python):
n = input()
n2 = ""
for _ in n:
    if _ == "1":
        n2 += "9"
    elif _ == "9":
        n2 += "1"
    else:
        n2 += _
print(n2)

Solution (Python):

def solve():
    n = input()
    n = n.replace('1', '.')
    n = n.replace('9', '1')
    n = n.replace('.', '9')
    res = n
    return str(res)

if __name__ == '__main__':
    print(solve())

Solution (Python):
n = list(input())
nn = []
for i in n:
    if i == '9':
        nn.append('1')
    else:
        nn.append('9')
print(''.join(nn))

Solution (Python):
a = list(input())
for i in range(3):
	a[i] = int(a[i])
	if a[i] ==1:
		a[i] = 9
	else:
		a[i] = 1
print(a[0]*100+a[1]*10+a[2])

Solution (Python):
S = input()


S = S.replace("9","!")
S = S.replace("1","9")
S = S.replace("!","1")

print(S)

Solution (Python):
question="A"
input=raw_input
if question=="A":
	t=input()
	t=t.replace("9","n")
	t=t.replace("1","o")
	t=t.replace("n","1")
	t=t.replace("o","9")
	print(t)
if question=="B":
	pass
if question=="C":
	pass
if question=="D":
	pass
if question=="E":
	pass

Solution (Python):
n = raw_input()

n = n.replace('1', 'l')
n = n.replace('9', 'q')
n = n.replace('l', '9')
n = n.replace('q', '1')

print n

Solution (Python):
lis = []
s = str(input())
for i in range(len(s)):
  if s[i] == "1":
    lis.append("9")
  elif s[i] == "9":
    lis.append("1")
  else:
    lis.append(s[i])
print("".join(lis))

Solution (Python):
a = input()
a = list(a)
for i in range(len(a)):
    if a[i]=="1":
        a[i]="9"
    elif a[i]=="9":
        a[i]="1"

print("".join(a))

Solution (Python):
import numpy as np

a = input()
b = ''
for aa in a:
    if aa == '1':
        b += '9'
    else:
        b += '1'
print(b)

Solution (Python):
n = list(input())
for i in range(3):
  if (n[i] == '1'):
    n[i] = '9'
  else:
    n[i] = '1'
for i in range(3):
  print(n[i],end = '')

Solution (Python):
if __name__ == '__main__' :
    A = input()
    B = ""
    for i in range(0,len(A)):
        if A[i] == '1':
            B += '9'
        elif A[i] == '9':
            B += '1'
        else:
            B += A[i]
    print(B)

Solution (Python):
num = input()

for i in num:
    if i == '1':
        print('9', end='')
    elif i == '9':
        print('1', end='')

Solution (Python):
n = input()
n = n.replace('1', 'A')
n = n.replace('9', '1')
n = n.replace('A', '9')

print(n)

Solution (Python):
intput_ = list(input())
output = ""
for s_ in intput_:
  if s_ == '1':
    output += "9"
  elif s_ == '9':
    output += "1"
  else:
    output += s_

print(output)

Solution (Python):
n = list(input())

for i in range(len(n)):
    if n[i] == '1':
        n[i] = '9'
    else:
        n[i] = '1'

print(''.join(n))

Solution (Python):
if __name__ == '__main__':
    N = input()
    result = ''
    for n in N:
        if n == '1':
            result += '9'
        elif n == '9':
            result += '1'
    print(int(result))

Solution (Python):
import numpy as np
import math







N = list(map(int, input()))

for i in range(3):
    if N[i] == 1:
        N[i] = 9
    elif N[i] == 9:
        N[i] = 1

print(N[0],N[1],N[2], sep='')

Solution (Python):
N = input()

ans = ""
for ni in N:
    if ni == "1":
        ans += "9"
    else:
        ans += "1"

print(ans)

Solution (Python):
n = input().strip()
print(n.translate(str.maketrans({"1":"9", "9":"1"})))

Solution (Python):
S = input()
T = []
for i in range(3):
  if S[i] == "1":
    T.append("9")
  else:
    T.append("1")
    
print("".join(T))

Solution (Python):
listN = list(str(input()))

index=0
while index < 3:
    if listN[index] == "1":
        listN[index]="9"
    elif listN[index]=="9":
        listN[index]="1"
    index+=1

print(listN[0]+listN[1]+listN[2])

Solution (Python):
N=int(input())
print(1110-N)

Solution (Python):
s=list(input())
for i in range(len(s)):
    if s[i]=="1":
        s[i]="9"
    elif s[i]=="9":
        s[i]="1"

print("".join(s))

Solution (Python):
print(1110-int(input()))

Solution (Python):
n = input()
a = ''
for i in n:
    if i == '9':
        a += '1'
    else:
        a += '9'

print(a)

Solution (Python):
ans = 1110 - int(input())
print(ans)

Solution (Python):
n = list(input())

for i,x in enumerate(n):
    if x == '1':
        n[i] = '9'
    else:
        n[i] = '1'

print("".join(n))

Solution (Python):

def main():
    n = list(input())

    ans = ""
    for i in n:
        if i == "1":
            ans+= "9"
        if i == "9":
            ans+= "1"

    print(ans)


if __name__ == "__main__":
        main()

Solution (Python):
n=input()
m=n.replace('1','6')
l=m.replace('9','1')
o=l.replace('6','9')
print(o)

Solution (Python):
n = input()
ans = ''
for c in n:
  if c == '1':
    c = '9'
  elif c == '9':
    c = '1'
  ans += c
print(ans)

Solution (Python):
n = input()

ans = ""
for s in n:
    ans += ["1", "9"][s == "1"]

print(ans)

Solution (Python):
s = input()
print(s.replace('1', '

Solution (Python):
n=input()
ans=""
for i in n:
    if i =="1":
        ans+="9"
    elif i=="9":
        ans+="1"
    else:
        ans+=i
print(ans)

Solution (Python):
S = input()
ans = ""

for i in range(3):
    if S[i] == "1":
        ans += "9"
    elif S[i] == "9":
        ans += "1"
    else:
        ans += S[i]

print(ans)

Solution (Python):
n = list(input())
for i in range(len(n)):
    if n[i] == '1':
        n[i] = '9'
    else:
        n[i] = '1'
ans = ''
for s in n:
    ans += str(s)
    
print(ans)

Solution (Python):
if __name__ == '__main__':
    n = input()
    n = n.replace('1', 't')
    n = n.replace('9', '1')
    n = n.replace('t', '9')
    print(n)

Solution (Python):
n = input()
out = ''

for i in n:
    if i == '9':
        out += '1'
    else:
        out+= '9'

print (out)

Solution (Python):
s = input()

ans = ""
for i in s:
    if i=='1':
        ans += '9'
    elif i=='9':
        ans += '1'
    else:
        ans += i

print(ans)

Solution (Python):
s = input()
ans = ''
for i in range(len(s)):
    if s[i] == '1':
        ans = ans + '9'
    else:
        ans = ans + '1'
print(ans)

Solution (Python):
s = input()
t = []
for i in range(len(s)):
  if s[i] == '1':
    t.append('9')
  else:
    t.append('1')
print(''.join(t))

Solution (Python):
n=input().replace("1","2").replace("9","1").replace("2","9")
print(n)

Solution (Python):
n=input()
s=""
for i in n:
  if i=="1":
    s+="9"
  elif i=="9":
    s+="1"
  else:
    s+=i
print(s)

Solution (Python):
n = list(input())
for i in range(len(n)):
  if n[i]=='1':
    n[i]='9'
  elif n[i]=='9':
    n[i]='1'
print("".join(n))

Solution (Python):
c = input()
temp = []
for i in range(len(c)):
    if c[i] =="1":
        temp.append("9")
    else:
        temp.append("1")
print("".join(temp))

Solution (Python):
N = input()
res = ''
for i in range(len(N)):
    if N[i] == '1':
        res += '9'
    if N[i] == '9':
        res += '1'
        
print(res)

Solution (Python):
def main():
    n = input()

    ans = ""
    for c in n:
        if c == "1":
            ans += "9"
        elif c == "9":
            ans += "1"
        else:
            ans += c

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):

s=list(input())
ass =''
for i in range(len(s)):
    if s[i] == '9':
        s[i] = '1'
    else:
        s[i] = '9'
    ass += s[i]
print(ass)

Solution (Python):
a = int(raw_input())
print 1110-a

Solution (Python):
print(input().replace("1","a").replace("9","1").replace("a","9"))

Solution (Python):
n=input()
l=[]

for i in n:
	if i=='9':
		l.append('1')
	elif i=='1':
		l.append('9')
	else:
		l.append(i)

print(''.join(l))

Solution (Python):
n = input()
ans = ""
for i in n:
    if i == '1':
        ans += '9'
    else:
        ans += '1'

print(ans)

Solution (Python):
n = input()
a = ''
for x in n:
	if x == '1':
		a += '9'
	elif x == '9':
		a += '1'
	else:
		a += x
print(a)

Solution (Python):
n = input()

ans = ''
for ni in n:
    if ni == '1':
        ans += '9'
    else:
        ans += '1'
print(ans)

Solution (Python):
n = input()
ans = ""
for s in n:
    if s == "1":
        ans += "9"
    elif s == "9":
        ans += "1"
    else:
        ans += s
print(ans)

Solution (Python):
x = input().replace('1', 'X').replace('9', 'Y')
print(int(x.replace('X', '9').replace('Y', '1')))

Solution (Python):
n = list(input())
ans = ""
for i in n:
    if i == "1":
        ans += "9"
    else:
        ans += "1"
print(ans)

Solution (Python):
n = input()

for num in n:
    if num == "1":
        print(9,end="")
    elif num == "9":
        print(1,end="")
    else:
        print(num,end="")


print()

Solution (Python):
n = input()
print(''.join(('1' if c == '9' else '9') for c in n))

Solution (Python):
N=input()
for i in range(3):
    if i < 2:
        if N[i] == "1":
            print("9",end="")
        else:
            print("1",end="")
    else:
        if N[i] == "1":
            print("9")
        else:
            print("1")

Solution (Python):
N = list(input())

l = ""
for num in N:
    if num == "1":
        l = l + "9"
    else:
        l = l + "1"

print(l)

Solution (Python):
a = input()
ans = ""
for i in a:
  if i == '1':
    ans += '9'
  else:
    ans += '1'
    
print(ans)

Solution (Python):
s=input().strip()
print("".join(("9" if x=="1" else "1") for x in s))

Solution (Python):
n = input()
print(n.replace("1", "

Solution (Python):
n = input()
r = ""
for s in n:
    if s == "1":
        r += "9"
    else:
        r += "1"
print(r)

Solution (Python):


def main():
    n = input()
    ans = ""
    for nn in n:
        if nn == "9":
            ans += "1"
        elif nn == "1":
            ans += "9"
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
n = input()

answer = ""
for i in range(len(n)):
    if n[i] == "1":
        answer = answer + "9"
    elif n[i] == "9":
        answer = answer + "1"
    else:
        answer = answer + n[i]
    

print(answer)

Solution (Python):


INF = float('inf')


def inpl(): return list(map(int, input().split()))


N = int(input())
N = str(N)
ans = ''
for n in N:
    if n == '1':
        ans += '9'
    else:
        ans += '1'
print(ans)

Solution (Python):
a = input().replace("1", "a").replace("9", "1").replace("a", "9")

print(a)

Solution (Python):
n=input()
ans=''
for x in n:
    if x =='9':
        ans+='1'
    else:
        ans+='9'
print(ans)

Solution (Python):
n = input()

ans = []

for i in range(3):
    if n[i] == "1":
        ans.append("9")

    else:
        ans.append("1")

print(''.join(ans))

Solution (Python):
S = input()
T = ""
for k in S:
    if k == "1":
        T += "9"
    else:
        T += "1"
print(T)

Solution (Python):
ans = ''
for i in input():
    if i == '1':
        ans += '9'
    elif i == '9':
        ans += '1'
    else:
        ans += i
print(ans)

Solution (Python):
inp = list(input())
res = []
for i in range(3):
    if inp[i]=="1":
        res.append("9")
    else:
        res.append("1")
print("".join(res))

Solution (Python):
n = input()

ans = ''
for dig in n:
    if dig == '1':
        ans += '9'
    else:
        ans += '1'

print(ans)

Solution (Python):
n = input()
print(n.translate(str.maketrans({'1': '9', '9': '1'})))

Solution (Python):
n=list(input())
for i in range(len(n)):
    if n[i]=='1':
        print('9',end='')
    if n[i]=='9':
        print('1',end='')

Solution (Python):
n = input()
for ni in n:
    if ni == "1":
        print("9", end='')
    elif ni == "9":
        print("1", end='')
print()

Solution (Python):
N = list(input())
ans = [''] * len(N)
for k in range(len(N)):
    if N[k] == '1':
        ans[k] = '9'
    if N[k] == '9':
        ans[k] = '1'
print(''.join(ans))

Solution (Python):
n = input()
res = ""
for i in n:
    if i =="9":
       res += "1"
    else:
        res += "9"
print(res)

Solution (Python):
a = input()
f = ''
for x in a:
    if x == '1':
        f = f + '9'
    else:
        f = f + '1'

print(f)

Solution (Python):
print(1110 - int(input()))

Solution (Python):
n = str(input())

ans = ''
for i in n:
    if i == '1':
        ans += '9'
    elif i == '9':
        ans += '1'
print(ans)

Solution (Python):

import math,string,itertools,fractions,heapq,collections,re,array,bisect
import numpy as np

N = input()
ans = ''
for n in N:
    if n == '1':
        ans += '9'
    else:
        ans += '1'
print(ans)

Solution (Python):
A=input()
out=""
for i in A:
    if i=="9":
        out+="1"
    else:
        out+="9"
print(out)

Solution (Python):
N = list(input())
for i in range(len(N)) :
    if N[i] == "1" :
        N[i] = "9"
    elif N[i] == "9" :
        N[i] = "1"
print("".join(N))

Solution (Python):
S = input()

for s in S:
    if s == '1':
        s = 9
    elif s == '9':
        s = 1

    print(s, end='')

Solution (Python):
n = input()
for i in n:
    if i == '1':
        print("9",end="")
    else:
        print("1",end="")
print("")

Solution (Python):
n = str(input())
c = ""
for i in range(3):
    if n[i] == "1":
        c += "9"
    elif n[i] == "9":
        c += "1"
print(int(c))

Solution (Python):
n = input()
res = ""
for i in n:
    if i == "1": res += "9"
    else: res += "1"
print(res)

Solution (Python):


EXTRA = "a"

print(input().replace("1", EXTRA).replace("9", "1").replace(EXTRA, "9"))

Solution (Python):
s = input()
ans = ""
for i in s:
    ans += str(10 - int(i))
print(ans)

Solution (Python):
print(input().replace('9', 't').replace('1','9').replace('t','1'))

Solution (Python):

def inputN(typ=str):
    return map(typ, raw_input().split())

n = inputN(str)[0]
a = ''
for c in n:
    if c == '1':
        a += '9'
    elif c == '9':
        a += '1'
    else:
        a += c
print a

Solution (Python):
x = input().replace("1", "X").replace("9", "1").replace("X", "9")
print(x)

Solution (Python):
s=input()
for i in s:
    if i=='1':
        print('9',end='')
    elif i=='9':
        print('1', end='')

Solution (Python):
n = input()
ans = ''
for i in n:
	if i == '9':
		ans += '1'
	else:
		ans+= '9'
print(ans)

Solution (Python):
str = input()

ans = ""
for i in str:
    if(i == "1"):
        ans += "9"
    else:
        ans += "1"

print(ans)

Solution (Python):
print(input().replace('1','a').replace('9','1').replace('a','9'))

Solution (Python):
N = int(input())
print(1110-N)

Solution (Python):
n = input()
n = n.replace('1','a')
n = n.replace('9','1')
n = n.replace('a','9')
print(n)

Solution (Python):
def solve(N):
    return l.replace("1", "8").replace("9", "1").replace("8", "9")

if __name__ == "__main__":
    l = input()
    print(solve(l))

Solution (Python):

S = input()

ans = ""
for s in S:
    if s == "1":
        ans += "9"
    elif s == "9":
        ans += "1"

print(ans)

Solution (Python):
n = input()
ans = ''
for i in n:
    if i == '1':
        ans += '9'
    elif i == '9':
        ans += '1'
    else:
        ans += i
print(ans)

Solution (Python):
a = list(input())
ans = ""
for c in a:
    if c == "1":
        ans = ans + "9"
    else:
        ans = ans + "1"
print(ans)

Solution (Python):
N = input()

x = ''
for n in N:
    if n == '1':
        x += '9'
    else:
        x += '1'
print(x)

Solution (Python):


def main():
    n = input()
    for i in n:
        if i == '1':
            print(9, end='')
        elif i == '9':
            print(1, end='')
    print('')
    
if __name__ == '__main__':
    main()

Solution (Python):
a = input()
output = ''
for i in a:
	if i == '1':
		output += '9'
	elif i == '9':
		output += '1'
	else:
		output += i
		
print (output)

Solution (Python):
s=input()
s=s.replace('1',',').replace('9','1').replace(',','9')
print(s)

Solution (Python):
n = input()

for i in range(3):
    if n[i] == '1':
        print('9', end='')
    else:
        print('1', end='')

Solution (Python):
print(input().replace("1", "@").replace("9", "1").replace("@", "9"))

Solution (Python):
REPL = {"1": "9", "9": "1"}

num = input()
for char in num:
  print(REPL.get(char, char), end="")
print()

Solution (Python):
n = input()
ans = ''
for x in n:
    if x == '1':
        ans += '9'
    else:
        ans += '1'
print(ans)

Solution (Python):
a = list(input())
for i in range(3):
    if a[i] == "1":
        a[i] = "9"
    else:
        a[i] = "1"
print("".join(a))

Solution (Python):
n=int(input())
print(1110-n)

Solution (Python):
n = int(input())
print(1110-n)

Solution (Python):
l=list(input())
for i in range(len(l)):
    if(l[i]=='9'):
        print(1,end="")
    else:
        print(9,end="")

Solution (Python):
n = int(input())
print(1110-n)

Solution (Python):
d={'1':'9', '9':'1'}
print(''.join(d[c] for c in input()))

Solution (Python):
print(1110-int(input()))