S=eval(input())

S=S.replace("7","8",1)

print(S)
S=eval(input())

print((S[:3]+"8"+S[4:]))
S = eval(input())
S = S.replace("7", "8", 1)
print(S)

S = eval(input())
print((S[:3] + "8" + S[4:]))

-S = S.replace("7", "8", 1) -print(S) +print((S[:3] + "8" + S[4:]))