import scala.io.Source

object Main extends App {

  val input: Iterator[String] = for (l <- Source.stdin.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)
}