tmp = int(eval(input()))

hour = tmp // 3600

minute = (tmp - hour * 3600) // 60

second = (tmp - hour * 3600 - minute * 60)

print(("{}:{}:{}".format(hour, minute, second)))
n = int(eval(input()))



#hour

h = n // 3600



#minute

m = (n%3600)//60



#second

s = (n%60)



print(("{}:{}:{}".format(h, m, s)))

tmp = int(eval(input()))
hour = tmp // 3600
minute = (tmp - hour * 3600) // 60
second = tmp - hour * 3600 - minute * 60
print(("{}:{}:{}".format(hour, minute, second)))

n = int(eval(input()))
# hour
h = n // 3600
# minute
m = (n % 3600) // 60
# second
s = n % 60
print(("{}:{}:{}".format(h, m, s)))

-tmp = int(eval(input())) -hour = tmp // 3600 -minute = (tmp - hour * 3600) // 60 -second = tmp - hour * 3600 - minute * 60 -print(("{}:{}:{}".format(hour, minute, second))) +n = int(eval(input())) +# hour +h = n // 3600 +# minute +m = (n % 3600) // 60 +# second +s = n % 60 +print(("{}:{}:{}".format(h, m, s)))