object Main extends App {
    import scala.annotation.tailrec

    val sc = new java.util.Scanner(System.in)
    val pw = new java.io.PrintWriter(System.out)
    @tailrec
    def output(i: Int = 1, n: Int = sc.nextInt): Unit = {
        if( n != 0 ) {
            pw.println("Case "+i+": "+n)
            output(i=i+1)
        }
    }

    output()
    pw.flush
}
