s=int(eval(input()))

print(f'{s//3600}:{s//60%60}:{s%60}')
s=int(input())

print(s//3600,s//60%60,s%60,sep=':')

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

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

-s = int(eval(input())) -print(f"{s//3600}:{s//60%60}:{s%60}") +s = int(input()) +print(s // 3600, s // 60 % 60, s % 60, sep=":")