#include <stdio.h>

int main()
{
    int sec = 0;
    //输入
    scanf("%d", &sec);
    //输出
    printf("%d %d %d", sec / 3600, sec / 60 % 60, sec % 60);

    return 0;
}