#include<bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; cout<<x/3600<<" "; cout<<x%3600/60<<" " ; cout<<x%3600%60; return 0; }