import java.util.Scanner; public class Speed_Calvin { public static void main(String[] args) { Scanner in = new Scanner(System.in); while(in.hasNextLine()) { String t = in.nextLine(); Scanner in2 = new Scanner(t); if (t.equals("0 0 0")) { break; } double d = in2.nextInt(); double s1 = in2.nextInt(); double s2 = in2.nextInt(); in2.close(); double ss1 = s1/3600.0; double ss2 = s2/3600.0; double t1 = d/ss1; double t2 = d/ss2; double d1 = t1 - t2; int h = (int) (d1/3600); d1 = d1 - 3600*h; int m = (int) (d1 / 60); d1 = d1 - 60 * m; int s = (int) Math.round(d1); String ms = String.valueOf(m); String ss = String.valueOf(s); if (m < 10) { ms = "0" + ms; } if (s < 10) { ss = "0" + ss; } System.out.println(h + ":" + ms + ":" + ss); } in.close(); } }