#include<iostream> using namespace std; int main(){ int X; cin>>X; printf("%d %d %d\n",X/60/60,X%3600/60,X%3600%60); return 0; }