s=int(eval(input()))

h=int(s/3600)

m=int(s/60-60*h)

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

h,m,s=list(map(str,(h,m,s)))

print((h+':'+m+':'+s))
s=int(input())

h=s/3600

m=(s-3600*h)/60

print("%d:%d:%d"%(h,m,s-3600*h-60*m))
s = int(eval(input()))
h = int(s / 3600)
m = int(s / 60 - 60 * h)
s = int(s - 3600 * h - 60 * m)
h, m, s = list(map(str, (h, m, s)))
print((h + ":" + m + ":" + s))

s = int(input())
h = s / 3600
m = (s - 3600 * h) / 60
print("%d:%d:%d" % (h, m, s - 3600 * h - 60 * m))

-s = int(eval(input())) -h = int(s / 3600) -m = int(s / 60 - 60 * h) -s = int(s - 3600 * h - 60 * m) -h, m, s = list(map(str, (h, m, s))) -print((h + ":" + m + ":" + s)) +s = int(input()) +h = s / 3600 +m = (s - 3600 * h) / 60 +print("%d:%d:%d" % (h, m, s - 3600 * h - 60 * m))