a = int(eval(input()))

h = int(a / 3600)

m = int((a - h * 3600) / 60)

s = int(a - h * 3600 - m * 60)

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

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

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

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

-a = int(eval(input())) -h = int(a / 3600) -m = int((a - h * 3600) / 60) -s = int(a - h * 3600 - m * 60) -print((":".join(map(str, [h, m, s])))) +num = int(input()) +print(int(num / 3600), int((num % 3600) / 60), num % 60, sep=":")