import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int seconds=in.nextInt();
        int hour=seconds/3600;
        int minute=(seconds%3600)/60;
        int s=seconds%60;
        System.out.println(hour+" "+minute+" "+s);
    }
}