const input = require('fs').readFileSync('/dev/stdin', 'utf8');
const lines = input.trim().split('\n');

while (line = lines.shift()) {
  let seconds = parseInt(line);
  let minutes = Math.floor(seconds / 60);
  const hours = Math.floor(minutes / 60);
  seconds = seconds - (hours * 60 * 60);
  minutes = Math.floor(seconds/60);
  seconds = seconds - (minutes * 60);
  const time = `${hours}:${minutes}:${seconds}`;
  console.log(time);
} 
