#include <stdio.h>

int main() 
{
    long long int time , hour ,  min ,seconds;
    scanf("%lld",&time);
    hour = time/3600;
    min = (time - hour*3600)/60;
    seconds = time%60;
    
    printf("%lld %lld %lld",hour,min,seconds);

    return 0;
}