open Scanf
open Printf

let rec f i x s =
	if 0 <> x then 
		let ss = s^"Case "^(string_of_int i)^": "^(string_of_int x)^"\n" in
		let c = read_int() in
		f (i+1) c ss
	else
		printf "%s" s;;

let ptc =
	let c = read_int() in
	let s = "" in
	f 1 c s;;

ptc;;