import time while 1:s=raw_input();print s+'='+time.ctime(sum(int(s[x*3:][:2])*60**(~x%3)+9e3for x in range(6)))[11:19]