object Main extends App {
  val addPrefix = {
    var cnt = 0
    (n: String) => {
      cnt += 1
      s"Case ${cnt}: ${n}"
    }
  }
  for(line <- scala.io.Source.stdin.getLines() if line != "0") {
    println(addPrefix(line))
  }
}