import Control.Monad

main = do
    givenstr <- getContents
    forM_ ((zip [1..] . map (read :: (String -> Integer)) . lines ) givenstr) $ \i -> do
        if (snd i == 0) then return () else putStrLn ("Case " ++ (show $ fst i) ++ ": " ++ (show $ snd i))