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