process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (second) {
    var hour = Math.floor(second / 3600);
    var minute = Math.floor((second - 3600 * hour) / 60);
    second = second - (hour * 3600 + minute * 60);
    console.log(hour,":", minute,":", second);
});