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):
S = list(input())
for i in range(3):
  if S[i]=="9":
    S[i]="1"
  elif S[i]=="1":
    S[i] ="9"
print("".join(S))

Solution (Python):
N = input()

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

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

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

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

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

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

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

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

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

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

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

print(ans)

Solution (Python):
print(''.join(list(map(str, map(lambda x: int(9/int(x)) if int(9%int(x))==0 else x, input())))))

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

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

Solution (Python):

def f(s):
    if s == '1':
        return '9'
    else:
        return '1'
    
n = input()
print(f(n[0])+f(n[1])+f(n[2]))

Solution (Python):
S = int(input()) 
inp = [111,119,191,911,199,919,991,999]
out = [999,991,919,199,911,191,119,111]

for i in range(8):
  if inp[i] == S:
    print(out[i])
    quit()

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

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

Solution (Python):

def main():
    N = input().rstrip()
    ans = N.translate(str.maketrans({"1": "9", "9": "1"}))
    print(ans)


if __name__ == "__main__":
    main()

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

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

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(n[0]*100+n[1]*10+n[2])

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

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

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

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

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

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

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

Solution (Python):
a = list(input())
if a[0]=="1":
        i="9"
else:
        i="1"
if a[1]=="1":
        j="9"
else:
        j="1"        
if a[2]=="1":
        k="9"
else:
        k="1"
print(i+j+k)

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

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

print(ans)

Solution (Python):

n = input()
m = []

for i in range(3):
    if n[i] == '1':
        m.append('9')
    elif n[i] == '9':
        m.append('1')
    else:
        m.append(n[i])

print(''.join(m))

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

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

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

Solution (Python):
S=input()
d={
    "1":"9",
    "9":"1"
    }
for s in S:
    print(d[s],end="")
print()

Solution (Python):
n = input()
output1 = [0,0,0]

for x in range (3):

    output1[x]=n[x]
    
    if n[x]=='1':
        output1[x]=9
    if n[x]=='9':
        output1[x]=1
str1 = ''.join(str(e) for e in output1)

print (str1)

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

Solution (Python):
n = input()

s_list = []

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

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

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

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

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

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

print(100*n[0]+10*n[1]+n[2])

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

n=''.join(n)

print(n)

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

ans = ""
for n in N:
    formura = "10-{}".format(n)
    ans += str(eval(formura))

print(int(ans))

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

Solution (Python):

print(input().translate(str.maketrans({"1":"9", "9": "1"})))

Solution (Python):
n = input()

print(int(("1" if n[0] == "9" else "9") + ("1" if n[1] == "9" else "9") + ("1" if n[2] == "9" else "9")))

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

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

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

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

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

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

N = input().split()
N = N[0]
ans=""
for i in range(3):
    if N[i]=="1":
        ans+="9"
    else:
        ans+="1"
print(ans)

Solution (Python):
s = input()
ans = []
for i in range(3):
    if s[i] == '1':
        ans.append('9')
    else:
        ans.append('1')

print(''.join(ans))

Solution (Python):
n = input()
l = ["0"]*3
l[0] = "9" if n[0] == "1" else "1"
l[1] = "9" if n[1] == "1" else "1"
l[2] = "9" if n[2] == "1" else "1"
r = "".join(l)
print(r)

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

n = input().strip()
ans = ''
for digit in n:
    if digit == '1':
        ans += '9'
    elif digit == '9':
        ans += '1'
    else:
        ans += digit
    
print(ans)

Solution (Python):
n = input()
L = []
for i in n:
    L.append(i)
for i, v in enumerate(L):
    if v == '1':
        L[i] = '9'
    else:
        L[i] = '1'
print(''.join(L))

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

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

Solution (Python):
n = int(input())
print(999 + 111 - n)

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

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

	elif l[i]=="9":
		l[i]="1"

print("".join(l))

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

Solution (Python):
s = input()

a = ""
for i in range(len(s)):
  if s[i] == str(1):
    a += str(9)
  elif s[i] == str(9):
    a += str(1)
print(a)

Solution (Python):

n = str(input())

n = n.replace('1', '8')
n = n.replace('9', '2')
n = n.replace('8', '9')
n = n.replace('2', '1')
print(n)

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

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

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

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

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

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

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

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

Solution (Python):

n = input()
print(n.replace('1','t').replace('9','1').replace('t','9'))

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

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

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

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

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

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

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):
l = list(str(input()))
for i in range(3):
    if l[i]=='1':
        l[i]='9'
    else:
        l[i]='1'
print(int(''.join(l)))

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):
print(''.join(['1' if i == '9' else '9' for i in input()]))

Solution (Python):
n = input()

print(n.translate(str.maketrans({'1': '9', '9': '1'})))

Solution (Python):
print(''.join([str(10 - int(x)) for x in input()]))

Solution (Python):
print(''.join(map(lambda x: str(10 - int(x)), input())))

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

Solution (Python):
S = input()

ans = ""

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

print(ans)

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

Solution (Python):
n = input()
res = ''
for i, val in enumerate(n):
    if val == '9':
        res += '1'
    elif val == '1':
        res += '9'
    else:
        res += val
print(res)

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

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):

n = input()
a = n[:1]
b = n[1:2]
c = n[2:3]
if a == "1":
    a = "9"
else:
    a = "1"
if b == "1":
    b = "9"
else:
    b = "1"
if c == "1":
    c = "9"
else:
    c = "1"
print(a+b+c)

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n = input()
ans = ""
for i in range(len(n)):
    if n[i] == "1":
        ans += "9"
    else:
        ans += "1"
print(ans)

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

Solution (Python):
S = input()

ans = ""

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

print(ans)

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

Solution (Python):
print(''.join(map(lambda x:'1' if x=='9' else '9', input())))

Solution (Python):


n = str(input())
lis = list(n)

ans = []
for i in range(len(lis)):
    if lis[i] == "1":
        ans.append("9")
    elif lis[i] == "9":
        ans.append("1")
print(int("".join(ans)))

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

Solution (Python):
n=input()
n=n.translate(str.maketrans("19","91"))
print(n)

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

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

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

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

Solution (Python):
n=int(input())
a=n//100
b=n//10-10*a
c=n%10
if a==1:
    a=9
else:
    a=1
if b==1:
    b=9
else:
    b=1
if c==1:
    c=9
else:
    c=1
print(100*a+10*b+c)

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

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

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):
n = input()

print(n.replace('1','x').replace('9','1').replace('x','9'))

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

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

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

Solution (Python):
s = input()

ans = ''
d = {'1': '9', '9': '1'}
for i in range(len(s)):
    ans += d[s[i]]

print(ans)

Solution (Python):
n = int(input())
if n == 111 or 119 or 191 or 199 or 911 or 919 or 991 or 999:
    moji = str(n)
    li = list(moji)
    for i in range(len(li)):
        if li[i] == '1':
            li[i] = '9'
        else:
            li[i] = '1'
    moji = "".join(li)
    n = int(moji)
    print(n)
else:
    print('hoge!')

Solution (Python):
s1 = input()

r1 = ""

for i1 in range(len(s1)):
    if s1[i1] == "1":
        r1 = r1 + "9"
    else:
        r1 = r1 + "1"

print(r1)

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

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

Solution (Python):

n = str(input())

print(n.replace('9', 'x').replace('1', '9').replace('x', '1'))

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(map(str,s)))

Solution (Python):
print("".join(["1" if s=="9" else "9" for s in str(input())]))

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

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

    print(ans)

main()

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

Solution (Python):
n=input()
ans=[]
for i in n:
  if i=='1':
    ans.append(9)
  elif i=='9':
    ans.append(1)
  else:
    ans.append(i)
print(*ans,sep='')

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

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

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

Solution (Python):
a=input()
b=[a[0],a[1],a[2]]
for i in range(3):
  if b[i]=="1":
    b[i]="9"   
  elif b[i]=="9":
    b[i]="1" 
print(*b,sep="")

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

Solution (Python):
def main():
    s = input()
    ans = ""
    for c in s:
        if c == "1":
            ans += "9"
        else:
            ans += "1"
    return int(ans)

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

Solution (Python):
print(input().translate(str.maketrans('19','91')))

Solution (Python):
s='19'
n=input()
for i in n:
    print(s[i=='1'],end='')
print()

Solution (Python):
n = str(input())
n = n.replace("1", "x")
n = n.replace('9', '1')
n = n.replace('x', '9')
print(int(n))

Solution (Python):

n = list(map(int,list(input())))
ans = 0
for i in n:
  ans = 10*ans+(1 if i==9 else 9 if i==1 else i)
print(ans)

Solution (Python):
print(input().translate(str.maketrans('19','91')))

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

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

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

Solution (Python):
v = list(input())
v2 = list()

for i in v: 
  if(i == '9'):
    v2.append('1')
  else:
    v2.append('9')
    
print("".join(v2))

Solution (Python):
n = input()

res = ""
for s in n:
    if s == "1":
        res += "9"
    else:
        res += "1"

print(int(res))

Solution (Python):
N = list(str(input()))
if N[0] == '9':
    N[0] = '1'
else : 
    N[0] = '9'
if N[1]=='9':
    N[1] = '1'
else:
    N[1] = '9'
if N[2] == '9':
    N[2] = '1'
else:
    N[2] = '9'
print(N[0]+N[1]+N[2])

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

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

Solution (Python):
x = [int(i) for i in input()]

for i in range(len(x)):
  if x[i] == 1:
    x[i] = "9"
  elif x[i] == 9:
    x[i] = "1"
    
print("".join(x))

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

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

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()
n = n.replace("1","A")
n = n.replace("9","B")
n = n.replace("A","9")
n = n.replace("B","1")
print(int(n))

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

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(int(''.join(n)))

Solution (Python):
n = input()
def flip(s):
	if s == "9":
		return "1"
	elif s == "1":
		return "9"
	else:
		print("komattanaa")
l = []
for i in range(3):
	l.append(flip(n[i]))
print("".join(l))

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 = int(input())
n2 = list(str(n))

for i in range(len(n2)):
    if n2[i] == '1':
        n2[i] = '9'
    elif n2[i] == '9':
        n2[i] = '1'

n2 = ''.join(n2)
print(int(n2))

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

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

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

Solution (Python):
a,b,c=input()
print(str(10-int(a))+str(10-int(b))+str(10-int(c)))

Solution (Python):
def solve():
    s = input()
    return "".join(["9" if c == "1" else "1" for c in s])


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

Solution (Python):
n=list(str(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 = str(input())
print(n.replace("1", "*").replace("9", "1").replace("*", "9"))

Solution (Python):
n = input()

print(n.replace('1', 'a').replace('9','1').replace('a','9'))

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

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

Solution (Python):
ans = []
for s in input():
    if s == '1':
        ans.append('9')
    elif s == '9':
        ans.append('1')

print(*ans, sep='')

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

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

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

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

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

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

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

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

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

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

Solution (Python):
def test():
    a = list(map(int,input()))
    for i in range(len(a)):
        if a[i] == 1:
            a[i] = 9
        elif a[i] == 9:
            a[i] = 1

    print("".join(map(str,a)))



if __name__ == "__main__":
    test()

Solution (Python):
import math





inputa = input().split()









inputList = list(inputa[0])



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

ans = "".join(inputList)
print(ans)

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

N=[0]*3
m=[0]*3

N[0]=int(n/10)
N[1]=int(N[0]/10)
N[2]=int(N[1]/10)

m[0]=int(n%10)
m[1]=int(N[0]%10)
m[2]=int(N[1]%10)

for i in range(0,3):
    if m[i]==1:
        m[i]=9
    elif m[i]==9:
        m[i]=1

print(int(m[2]*100+m[1]*10+m[0]))

Solution (Python):
i = input()

k = []

for j in i:
    if j == '1':
        k.append('9')
    else:
        k.append('1')

print(''.join(k))

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

Solution (Python):
s = input()
print(*['9' if i == '1' else '1' for i in s], sep='')

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

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

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

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

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

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

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

Solution (Python):
n=[i for i 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 = str(input())
m = ""
for i in range(3):
    if n[i] == "1":
        m += "9"
    else:
        m += "1"
print(m)

Solution (Python):
print(*[{'1':'9','9':'1'}[i] for i in input()],sep='')

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

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

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

Solution (Python):

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

print('')

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

if n[0] == '1':
    n[0] = '9'
else:
    n[0] = '1'

if n[1] == '1':
    n[1] = '9'
else:
    n[1] = '1'

if n[2] == '1':
    n[2] = '9'
else:
    n[2] = '1'

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

Solution (Python):
n = input()
ans = 0
for i in range(3):
  if n[i] == '1':
    ans += 10**(2-i) * 9
  else:
    ans += 10**(2-i) * 1
print(ans)

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

Solution (Python):
n = [s for s in input()]
for i in range(len(n)):
  if n[i] == "1":
    n[i] = "9"
  else:
    n[i] = "1"
print(int("".join(n)))

Solution (Python):
a = [i for i in input()]
for j in range(3):
  if a[j] =="1":
    a[j] = "9"
  else:
    a[j] = "1"
print(a[0]+a[1]+a[2])

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

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

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

Solution (Python):
input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

mojiretu = ''

for x in s:
    mojiretu += x

print(int(mojiretu))

Solution (Python):
n = input()

ret = ''

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

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

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




if __name__ == '__main__' :
    main()

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

Solution (Python):

n = input()
ans = 0
for i in range(3):
  if n[i] == '1':
    ans += 10**(2-i) * 9
  else:
    ans += 10**(2-i) * 1
print(ans)

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

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

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

def main():
	s = input().strip()
	for c in s:
		if c == '1':
			print('9', end='')
		elif c == '9':
			print('1', end='')
		else:
			print(c, end='')
	print('')
if __name__ == '__main__':
	main()

Solution (Python):
n0 = input()
n1 = n0.replace('1','i')
n2 = n1.replace('9','j')
n3 = n2.replace('i','9')
print(n3.replace('j','1'))

Solution (Python):
n = str(input())
p = [10 - int(i) for i in n]
print(''.join(map(str,p)))

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

ans = []

for item in S:
  if item == "1":
    ans.append("9")
  elif item == "9":
    ans.append("1")
    
ans = "".join(ans)
print(ans)

Solution (Python):


n = [_ for _ in input().rstrip()]

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):
num = input()
ans = []
for i in num:
  if i=='1': ans.append('9')
  else: ans.append('1')
print(''.join(ans))

Solution (Python):
N = str(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):
n = str(input())
n = n.replace("1","o")
n = n.replace("9","n")
n = n.replace("n","1")
n = n.replace("o","9")
print(int(n))

Solution (Python):
n=str(input())
x=0
if n[0]=='1':
	x=x+900
elif n[0]=='9':
	x=x+100

if n[1]=='1':
	x=x+90
elif n[1]=='9':
	x=x+10

if n[2]=='1':
	x=x+9
elif n[2]=='9':
	x=x+1
print(x)

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

print(*n,sep="")

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(n[0]+n[1]+n[2])

Solution (Python):
n = int(input())
m = n
for i in range(3):
    if m % 10 == 1:
        n += 8 * (10**i)
    elif m % 10 == 9:
        n += -8 * (10**i)
    m = m//10
print(n)

Solution (Python):
a=input()
b1,b2,b3=0,0,0
if a[0]=='9':
    b1='1'
else:
    b1='9'
if a[1]=='9':
    b2='1'
else:
    b2='9'
if a[2]=='9':
    b3='1'
else:
    b3='9'
print(b1+b2+b3)

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

Solution (Python):
a = list(input())
for i, n in enumerate(a):
    if n == "1":
        a[i] = 9
    else:
        a[i] = 1
l = a[0] *100 + a[1] * 10 + a[2]  
print(int(l))

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

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

Solution (Python):
ss = input()
res = ''
for s in ss:
  if s == '1':
    res += '9'
  if s == '9':
    res += '1'
print(res)

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

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

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

Solution (Python):
x = input()
y = x.replace('9','2')
z = y.replace('1','9')
a = z.replace('2','1')
print(a)

Solution (Python):
for i in input():
    print([1,9][i=="1"],end="")
print()

Solution (Python):

def main():


    N = input()
    ans = []
    for i in N:
        if i=='1':
            ans.append("9")
        else:
            ans.append("1")

    print(''.join(ans))



if __name__== "__main__":
    main()

Solution (Python):
n = int(input().split()[0])
n = str(n)
n = n.replace('1', 'x')
n = n.replace('9', '1')
n = n.replace('x', '9')

print(n)

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

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

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

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

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

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

Solution (Python):


x = input()

x = list(map(lambda c: '9' if c == '1' else '1', x))
print("".join(x))

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

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

print("")

Solution (Python):
n = list(map(int, input()))
for i in range(3):
    print(10 - n[i], end="")