let put i x = print_string "Case ";print_int i;print_string ": ";print_int x;print_string "\n";;

let rec f i =
	Scanf.sscanf(read_line()) "%d" (fun x -> if x <> 0 then (put i x; f (i+1)) else ());;

f 1;;

