let () =
  let get_t x = x/3600 and
      get_h x = (x/60 mod 60) and
      get_s x = x mod 60 in
  let rec read () =
    let t,h,s = Scanf.scanf " %d %d %d\n" (fun x y z -> x,y,z)in
    if t = -1 && h = -1 && s = -1 then ()
    else
      begin
        let sec = t*3600 + h*60 + s in
        let rem1 = 120*60 - sec in
        let rem2 = rem1*3 in
        Printf.printf "%02d:%02d:%02d\n" (get_t rem1) (get_h rem1) (get_s rem1);
        Printf.printf "%02d:%02d:%02d\n" (get_t rem2) (get_h rem2) (get_s rem2);
        read ()
      end
  in read ()
;;