import Data.Char
main = do
  str <- getLine
  let x=foldl toint 0 str
  putStrLn $ (show.(`div`60).(`div`60)$x) ++":"++(show.(`mod`60).(`div`60)$x)++":"++(show.(`mod`60)$x)

toint a c = a*10+digitToInt c