import Control.Applicative

main :: IO ()
main = do
  solve 1

solve :: Int -> IO()
solve n = do
  x <- read <$> getLine :: IO Int
  if (x == 0) then return ()
    else do {
    putStrLn $ (makestr x n);
    solve (n + 1)
    }

makestr :: Int -> Int -> String
makestr x n = "Case " ++ (show n) ++ ": " ++ (show x)

  