'use strict';
(function(stdin) { 
  var inputs = stdin.toString();
  (function(S) {
    var  h = S / (60 * 60),m = S % (60 * 60) / 60,s = S % 60;
    console.log(h,m,s);
}(parseInt(inputs.trim(),10))); 
}(require('fs').readFileSync('/dev/stdin', 'utf8')));