S = int(input())

h = S // 3600

m = S % 3600 // 60

s = S % 60

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

S=int(input())

h=S//3600

m=(S%3600)//60

s=S%60

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

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

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

-m = S % 3600 // 60 +m = (S % 3600) // 60