let print_data n s = print_endline "Case " ^ (string_of_int n) ^ ": " ^ s

let rec loop case () =
  match read_line () with
  | "0" -> ()
  | data -> loop (case+1) (print_data case data)

let () = loop 1 ()