#include <stdio.h>

int main() {
    int second;
    scanf("%d",&second);
    printf("%d %d %d\n",second/3600,second%3600/60,second%60);
    return 0;
}

秒数转化为分钟,分钟转化为小时的进制都是以60为单位,故要判断多少秒可直接利用总秒数%60即可得到多余的秒数