import Control.Applicative
import Data.List

toInt ::String -> Int
toInt x=read x :: Int

toCaseStr :: Int-> Int->String
toCaseStr index x = concat ["Case ",(show index),": ",(show x)]

loop :: Int->IO ([String])
loop index = do
    x <- toInt <$> getLine
    if x==0 then (return []) else ((:) (toCaseStr index x) <$> (loop (1+index)))

main :: IO()
main = do
    ss<- loop 1
    putStrLn .concat .intersperse "\n" $ ss
