module Main where

import Data.Functor

main :: IO ()
main = do
{ loop 1
}

loop :: Int -> IO ()
loop i = do
{ [x] <- getInts
  ; if x == 0 then done
    else do
    { putStrLn ("Case " ++ show i ++ ":" ++ show x)
      ; loop (i+1)
    }
}
 
getInts :: IO [Int]
getInts = map read . words <$> getLine

done :: IO ()
done = return ()