int main()
{
    long int a = 0;
    scanf("%ld",&a);
    int b =a/3600;
    int c =(a%3600)/60;
    int d =(a%3600)%60;
    printf ("%d %d %d",b,c,d);
    return 0;
}