s = eval(input())

s = s[0:2] + "18" + s[4:]

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

print((s.replace("2017", "2018")))
s = eval(input())
s = s[0:2] + "18" + s[4:]
print(s)

s = eval(input())
print((s.replace("2017", "2018")))

-s = s[0:2] + "18" + s[4:] -print(s) +print((s.replace("2017", "2018")))