import re,time while 1:r=raw_input();h,m,s,i,n,t=map(int,re.split('\D',r));print r+'='+time.ctime(60*(m+n+60*(h+i-9))+s+t)[11:19]