#include <iostream>
using namespace std;
int main() {
long long seconds;
int hour,min,second;
cin>>seconds;
hour=seconds/3600;
min=(seconds%3600)/60;
second=seconds%60;
cout<<hour<<" "<<min<<" "<<second<<endl;
}
// 64 位输出请用 printf("%lld")


京公网安备 11010502036488号