import Control.Applicative
import Data.List
main =
    zipWith id [h,m,s] . repeat <$> readLn
    >>= putStrLn . (intercalate ":") . map show
    where
    h x = x `div` 3600
    m x = x `mod` 3600 `div` 60
    s x = x `mod` 3600 `mod` 60