module Main (main) where

import Data.Functor ((<$>))
import Control.Monad.Trans.State

showCase :: Show a => a -> State Int String
showCase x = state $ \n -> ("Case " ++ show n ++ ": " ++ show x, n+1)

main :: IO ()
main = do
  xs <- takeWhile (/=0) . map read . words <$> getContents :: IO [Int]
  mapM_ putStrLn $ evalState (mapM showCase xs) 1

