import java.util.Scanner;

public class Main{
	
	int h,m,s,S;
	
	public void input(){
		Scanner sc = new Scanner(System.in);
		S = sc.nextInt();
	}
	
	public void hour(){
		if(S >=0 && S < 86400){
			h = S/3600;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void minute(){
		if(S >=0 && S < 86400){
			m = (S-h*3600)/60;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void second(){
		if(S >=0 && S < 86400){
			s = S-h*3600-m*60;
		}
		else{
			System.out.print("error");
		}
		System.out.println(h+":"+m+":"+s);
	}
	
	public static void main(String[] args){
		Main obj = new Main();
		obj.input();
		obj.hour();
		obj.minute();
		obj.second();
	}
} import java.util.Scanner; Scanner java.util public class Main{
	
	int h,m,s,S;
	
	public void input(){
		Scanner sc = new Scanner(System.in);
		S = sc.nextInt();
	}
	
	public void hour(){
		if(S >=0 && S < 86400){
			h = S/3600;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void minute(){
		if(S >=0 && S < 86400){
			m = (S-h*3600)/60;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void second(){
		if(S >=0 && S < 86400){
			s = S-h*3600-m*60;
		}
		else{
			System.out.print("error");
		}
		System.out.println(h+":"+m+":"+s);
	}
	
	public static void main(String[] args){
		Main obj = new Main();
		obj.input();
		obj.hour();
		obj.minute();
		obj.second();
	}
} Main int h h m m s s S; S public void input(){
		Scanner sc = new Scanner(System.in);
		S = sc.nextInt();
	} input {
		Scanner sc = new Scanner(System.in);
		S = sc.nextInt();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) S = sc.nextInt() S sc.nextInt() sc.nextInt sc public void hour(){
		if(S >=0 && S < 86400){
			h = S/3600;
		}
		else{
			System.out.print("error");
		}
	} hour {
		if(S >=0 && S < 86400){
			h = S/3600;
		}
		else{
			System.out.print("error");
		}
	} if(S >=0 && S < 86400){
			h = S/3600;
		}
		else{
			System.out.print("error");
		} S >=0 && S < 86400 S >=0 S 0 S < 86400 S 86400 {
			h = S/3600;
		} h = S/3600 h S/3600 S 3600 {
			System.out.print("error");
		} System.out.print("error") System.out.print System.out System System.out "error" public void minute(){
		if(S >=0 && S < 86400){
			m = (S-h*3600)/60;
		}
		else{
			System.out.print("error");
		}
	} minute {
		if(S >=0 && S < 86400){
			m = (S-h*3600)/60;
		}
		else{
			System.out.print("error");
		}
	} if(S >=0 && S < 86400){
			m = (S-h*3600)/60;
		}
		else{
			System.out.print("error");
		} S >=0 && S < 86400 S >=0 S 0 S < 86400 S 86400 {
			m = (S-h*3600)/60;
		} m = (S-h*3600)/60 m (S-h*3600)/60 (S-h*3600) S h*3600 h 3600 60 {
			System.out.print("error");
		} System.out.print("error") System.out.print System.out System System.out "error" public void second(){
		if(S >=0 && S < 86400){
			s = S-h*3600-m*60;
		}
		else{
			System.out.print("error");
		}
		System.out.println(h+":"+m+":"+s);
	} second {
		if(S >=0 && S < 86400){
			s = S-h*3600-m*60;
		}
		else{
			System.out.print("error");
		}
		System.out.println(h+":"+m+":"+s);
	} if(S >=0 && S < 86400){
			s = S-h*3600-m*60;
		}
		else{
			System.out.print("error");
		} S >=0 && S < 86400 S >=0 S 0 S < 86400 S 86400 {
			s = S-h*3600-m*60;
		} s = S-h*3600-m*60 s S-h*3600-m*60 S-h*3600-m*60 S h*3600 h 3600 m*60 m 60 {
			System.out.print("error");
		} System.out.print("error") System.out.print System.out System System.out "error" System.out.println(h+":"+m+":"+s) System.out.println System.out System System.out h+":"+m+":"+s ":" m h+":"+m+":"+s h ":" m ":" s public static void main(String[] args){
		Main obj = new Main();
		obj.input();
		obj.hour();
		obj.minute();
		obj.second();
	} main {
		Main obj = new Main();
		obj.input();
		obj.hour();
		obj.minute();
		obj.second();
	} Main obj = new Main(); obj new Main() obj.input() obj.input obj obj.hour() obj.hour obj obj.minute() obj.minute obj obj.second() obj.second obj String[] args args public class Main{
	
	int h,m,s,S;
	
	public void input(){
		Scanner sc = new Scanner(System.in);
		S = sc.nextInt();
	}
	
	public void hour(){
		if(S >=0 && S < 86400){
			h = S/3600;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void minute(){
		if(S >=0 && S < 86400){
			m = (S-h*3600)/60;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void second(){
		if(S >=0 && S < 86400){
			s = S-h*3600-m*60;
		}
		else{
			System.out.print("error");
		}
		System.out.println(h+":"+m+":"+s);
	}
	
	public static void main(String[] args){
		Main obj = new Main();
		obj.input();
		obj.hour();
		obj.minute();
		obj.second();
	}
} public class Main{
	
	int h,m,s,S;
	
	public void input(){
		Scanner sc = new Scanner(System.in);
		S = sc.nextInt();
	}
	
	public void hour(){
		if(S >=0 && S < 86400){
			h = S/3600;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void minute(){
		if(S >=0 && S < 86400){
			m = (S-h*3600)/60;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void second(){
		if(S >=0 && S < 86400){
			s = S-h*3600-m*60;
		}
		else{
			System.out.print("error");
		}
		System.out.println(h+":"+m+":"+s);
	}
	
	public static void main(String[] args){
		Main obj = new Main();
		obj.input();
		obj.hour();
		obj.minute();
		obj.second();
	}
} Main
import java.util.Scanner;

public class Main{
	
	int h,m,s,S;
	
	public void input(){
		Scanner sc = new Scanner(System.in);
		S = sc.nextInt();
	}
	
	public void hour(){
		if(S >=0 && S < 86400){
			h = S/3600;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void minute(){
		if(S >=0 && S < 86400){
			m = (S-h*3600)/60;
		}
		else{
			System.out.print("error");
		}
	}
	
	public void second(){
		if(S >=0 && S < 86400){
			s = S-h*3600-m*60;
		}
		else{
			System.out.print("error");
		}
		System.out.println(h+":"+m+":"+s);
	}
	
	public static void main(String[] args){
		Main obj = new Main();
		obj.input();
		obj.hour();
		obj.minute();
		obj.second();
	}
}