import time while 1:r=raw_input();print r+"="+time.ctime(sum(9e3+int(r[3*i:][:2])*60**(~i%3)for i in range(6)))[11:19]