import scala.io.Source

object Main extends App {

    val numbers: Iterator[String] = for (l <- Source.stdin.getLines; if l != "0") yield l
    // val input = for (l <- Source.fromFile(args(0)).getLines; if l != "0") yield l
    val content: List[String] = input.toList
    val index: List[Int] = List.range(1, content.length + 1)

    val output: List[(Int, String)] = index.zip(content)

    for {
        o <- output
    } println("Case " + o._1 + ": " + o._2)
}