Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in 3:
    if n[i] == "1":
        n[i] = "9"
    elif n[i] == "9":
        n[i] = "1"
print("".join(n))

Fixed submission:
n = list(input())

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

for j in range(3):
  print(n[j], end="")

Buggy python submission (verdict: Runtime Error):
n = list(input())
for i in 3:
    if n[i] == "1":
        n[i] = "9"
    elif n[i] == "9":
        n[i] = "1"
print("".join(n))

Fixed submission:
n = list(input())

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

for j in range(3):
  print(n[j], end="")

Buggy python submission (verdict: Runtime Error):
n = list(input())
for i in 3:
    if n[i] == "1":
        n[i] = "9"
    elif n[i] == "9":
        n[i] = "1"
for i in n:
    print(i, end = "")

Fixed submission:
n = list(input())

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

for j in range(3):
  print(n[j], end="")

Buggy python submission (verdict: Runtime Error):
n = list(input())
for i in 3:
    if n[i] == "1":
        n[i] = "9"
    elif n[i] == "9":
        n[i] = "1"
for i in 3:
    print(i, end = "")

Fixed submission:
n = list(input())

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

for j in range(3):
  print(n[j], end="")

Buggy python submission (verdict: Runtime Error):
n = list(input())
for i in 3:
    if n[i] == "1":
        n[i] = "9"
    elif n[i] == "9":
        n[i] = "1"
for j in 3:
    print(j, end = "")

Fixed submission:
n = list(input())

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

for j in range(3):
  print(n[j], end="")

Buggy python submission (verdict: Runtime Error):
n = list(input())
for i in 3:
    if n[i] == "1":
        n[i] = "9"
    elif n[i] == "9":
        n[i] = "1"
for j in 3:
    print(n[j], end = "")

Fixed submission:
n = list(input())

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

for j in range(3):
  print(n[j], end="")

Buggy python submission (verdict: Runtime Error):
n =int(input)
lst = []
while n > 0:
    lst.append(n% 10)
    n //= 10
lst.reverse()
for i in 3:
    if lst[i] == "1":
        lst[i] == "9"
    elif lst[i] == "9":
        lst[i] == "1" 
print(lst)

Fixed submission:
n = list(input())

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

for j in range(3):
  print(n[j], end="")

Buggy python submission (verdict: Runtime Error):
n=int(input())
out = n.replace("1","a")
out = n.replace("9","1")
out = n.replace("a","9")
print(out)

Fixed submission:
n = list(input())

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

for j in range(3):
  print(n[j], end="")

Buggy python submission (verdict: Runtime Error):
n=int(input())
print(n.replace("1","a"))
print(n.replace("9","1"))
print(n.replace("a","9"))

Fixed submission:
n = list(input())

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

for j in range(3):
  print(n[j], end="")