s=list(eval(input()))

s[3]="8"

S="".join(s)

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

print(("2018"+s[4:]))
s = list(eval(input()))
s[3] = "8"
S = "".join(s)
print(S)

s = eval(input())
print(("2018" + s[4:]))

-s = list(eval(input())) -s[3] = "8" -S = "".join(s) -print(S) +s = eval(input()) +print(("2018" + s[4:]))