S = int(input())



if S >= 3600:

    h=S//3600

    m=S%3600//60

    s=S%60

elif 3600 > S >= 60:

    h=0

    m=S//60

    s=S%60

else:

    h=m=0

    s=S

print(h, m, s, sep=":")

s = int(input())

h = s // 3600

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

s = s -  h * 3600 - m * 60

print(h, m, s, sep=":")

S = int(input())
if S >= 3600:
    h = S // 3600
    m = S % 3600 // 60
    s = S % 60
elif 3600 > S >= 60:
    h = 0
    m = S // 60
    s = S % 60
else:
    h = m = 0
    s = S
print(h, m, s, sep=":")

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

-S = int(input()) -if S >= 3600: -    h = S // 3600 -    m = S % 3600 // 60 -    s = S % 60 -elif 3600 > S >= 60: -    h = 0 -    m = S // 60 -    s = S % 60 -else: -    h = m = 0 -    s = S +s = int(input()) +h = s // 3600 +m = (s - h * 3600) // 60 +s = s - h * 3600 - m * 60