
exception Error of string
let err s = raise (Error s)

let rec solve cnt =
    let x = Scanf.scanf "%d " (fun x -> x) in
    if x != 0 then (
        Printf.printf "Case %d: %d\n" cnt x;
        solve (cnt+1)
    )

let _ = solve 1
