x = int(input())

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

x = int(input())

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

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

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

-print(int(x / 3600), int(x / 60 % 60), int(x % 60), sep=":") +print(x // 3600, x // 60 % 60, x % 60, sep=":")