Program Time24 (Input, Output);

CONST
   SecondsInHour = 3600;
   SecondsInMinute = 60;

VAR
   seconds, hours, mins, secs : Integer;

BEGIN
   Writeln('Enter number of seconds since midnight');
   Readln(seconds);
   hours := seconds DIV SecondsInHour;
   seconds := seconds MOD SecondsInHour;
   mins := seconds DIV SecondsInMinute;
   secs := seconds MOD SecondsInMinute;
   Writeln('Time is: ',hours:2,':',mins:2,':',secs:2);
END.