s = int(eval(input()))

m, s = s // 60, s % 60

h, m = m // 60, m % 60

print((':'.join(map(str, [h,m,s]))))
s = int(eval(input()))



second = s % 60

s = s // 60

min = s % 60

hour = s // 60



print(f'{hour}:{min}:{second}')

s = int(eval(input()))
m, s = s // 60, s % 60
h, m = m // 60, m % 60
print((":".join(map(str, [h, m, s]))))

s = int(eval(input()))
second = s % 60
s = s // 60
min = s % 60
hour = s // 60
print(f"{hour}:{min}:{second}")

-m, s = s // 60, s % 60 -h, m = m // 60, m % 60 -print((":".join(map(str, [h, m, s])))) +second = s % 60 +s = s // 60 +min = s % 60 +hour = s // 60 +print(f"{hour}:{min}:{second}")