in_sec = int(eval(input()))



sec = in_sec % 60

min = (in_sec // 60) % 60

hour = (in_sec // 3600 )



print(("{}:{}:{}".format(hour,min,sec)))
time = int(input())



h = int(time/ 3600)

m = int((time%3600)/60)

s = int((time%3600)%60)



print(h,m,s,sep=':')

in_sec = int(eval(input()))
sec = in_sec % 60
min = (in_sec // 60) % 60
hour = in_sec // 3600
print(("{}:{}:{}".format(hour, min, sec)))

time = int(input())
h = int(time / 3600)
m = int((time % 3600) / 60)
s = int((time % 3600) % 60)
print(h, m, s, sep=":")

-in_sec = int(eval(input())) -sec = in_sec % 60 -min = (in_sec // 60) % 60 -hour = in_sec // 3600 -print(("{}:{}:{}".format(hour, min, sec))) +time = int(input()) +h = int(time / 3600) +m = int((time % 3600) / 60) +s = int((time % 3600) % 60) +print(h, m, s, sep=":")