S=int(eval(input()))

h = int(S/(60*60))

m = int(S/60)%60

s = S%60

print(("{0}:{1}:{2}".format(h,m,s)))                     
x=int(eval(input()))

h=x//(60*60)

x=x%(60*60)

m=x//60

x=x%60

print((str(h)+":"+str(m)+":"+str(x)))

S = int(eval(input()))
h = int(S / (60 * 60))
m = int(S / 60) % 60
s = S % 60
print(("{0}:{1}:{2}".format(h, m, s)))

x = int(eval(input()))
h = x // (60 * 60)
x = x % (60 * 60)
m = x // 60
x = x % 60
print((str(h) + ":" + str(m) + ":" + str(x)))

-S = int(eval(input())) -h = int(S / (60 * 60)) -m = int(S / 60) % 60 -s = S % 60 -print(("{0}:{1}:{2}".format(h, m, s))) +x = int(eval(input())) +h = x // (60 * 60) +x = x % (60 * 60) +m = x // 60 +x = x % 60 +print((str(h) + ":" + str(m) + ":" + str(x)))