S = int(input())

h = int(S / 3600)

m = int(S % 3600 / 60)

s = S % 60

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

S = int(eval(input()))



s = S % 60

m = S // 60 % 60

h = S // 60 // 60



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

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

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