#include <stdio.h>
int main(){
int h,m,s,second;
scanf("%d",&second);
s=(second%3600)%60;
m=(second%3600)/60;
h=second/3600;
printf("%d %d %d",h,m,s);
return 0;
}
int main(){
int h,m,s,second;
scanf("%d",&second);
s=(second%3600)%60;
m=(second%3600)/60;
h=second/3600;
printf("%d %d %d",h,m,s);
return 0;
}