def conv(sec):

    h = sec // (60 * 60)

    m = (sec - h * (60 * 60)) // 60

    s = sec - m * 60 - h * (60 * 60) 

    return ":".join([str(h), str(m), str(s)])



# inp = list(map(int, input().split()))

print((conv(int(eval(input())))))
x = int(eval(input()))

s = x % 60

x //= 60

m = x % 60

x //= 60

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

def conv(sec):
    h = sec // (60 * 60)
    m = (sec - h * (60 * 60)) // 60
    s = sec - m * 60 - h * (60 * 60)
    return ":".join([str(h), str(m), str(s)])


# inp = list(map(int, input().split()))
print((conv(int(eval(input())))))

x = int(eval(input()))
s = x % 60
x //= 60
m = x % 60
x //= 60
print(("{}:{}:{}".format(x, m, s)))

-def conv(sec): -    h = sec // (60 * 60) -    m = (sec - h * (60 * 60)) // 60 -    s = sec - m * 60 - h * (60 * 60) -    return ":".join([str(h), str(m), str(s)]) - - -# inp = list(map(int, input().split())) -print((conv(int(eval(input()))))) +x = int(eval(input())) +s = x % 60 +x //= 60 +m = x % 60 +x //= 60 +print(("{}:{}:{}".format(x, m, s)))