S = [i for i in input().split("/")]

if S[0] == "2017":

    print(("2018/"+S[1]+"/"+S[2]))
S = eval(input())

print((S.replace("2017", "2018")))
S = [i for i in input().split("/")]
if S[0] == "2017":
    print(("2018/" + S[1] + "/" + S[2]))

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

-S = [i for i in input().split("/")] -if S[0] == "2017": -    print(("2018/" + S[1] + "/" + S[2])) +S = eval(input()) +print((S.replace("2017", "2018")))