import System.IO.Error
import Control.Exception

fgen x i = "Case " ++ (show i) ++ ": " ++ (show x)

body :: Int -> IO ()
body i = do
         ln <- getLine
         putStrLn $ fgen (read ln :: Int) i
         body (i + 1)

main = catch (body 1) (\e -> if isEOFError e
                           then return ()
                           else ioError e)