import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("초를 입력하세요 : ");
int s = input.nextInt();
int m = (s % 3600) / 60;
int h = s / 3600;
int sec =(s%3600)% 60;
System.out.print(h+" "+m+" "+sec);
}
}