t = int(eval(input()))

h = int(t/3600)

m = int(t%3600/60)

s = int(t%3600%60)

print((str(h) + ":" + str(m) + ":" + str(s)))
S = int(eval(input()))

h = int(S/3600)

m = int(S%3600/60)

s = int(S%3600%60)

print((str(h) + ":" + str(m) + ":" + str(s)))
t = int(eval(input()))
h = int(t / 3600)
m = int(t % 3600 / 60)
s = int(t % 3600 % 60)
print((str(h) + ":" + str(m) + ":" + str(s)))

S = int(eval(input()))
h = int(S / 3600)
m = int(S % 3600 / 60)
s = int(S % 3600 % 60)
print((str(h) + ":" + str(m) + ":" + str(s)))

-t = int(eval(input())) -h = int(t / 3600) -m = int(t % 3600 / 60) -s = int(t % 3600 % 60) +S = int(eval(input())) +h = int(S / 3600) +m = int(S % 3600 / 60) +s = int(S % 3600 % 60)