import io.Source.stdin

object Main {
  
  def main(args: Array[String]) : Unit = {
    for ((x, index) <- stdin.getLines().toList.takeWhile(_ != "0").zipWithIndex) {
      println(s"Case ${index + 1}: $x")
    }
  }
}
