import Control.Monad

printTestCase :: Int -> IO ()
printTestCase i = do
  x <- readLn
  when (x /= 0) $ do
    putStrLn $ "Case " ++ show i ++ ": " ++ show x
    printTestCase $ i + 1

main :: IO ()
main = printTestCase 1