print(("/".join(["2018"] + input().split("/")[1:])))
print((input().replace("017","018")))
print(("/".join(["2018"] + input().split("/")[1:])))

print((input().replace("017", "018")))

-print(("/".join(["2018"] + input().split("/")[1:]))) +print((input().replace("017", "018")))