module Main where

import Data.Functor

getInts :: IO [Int]
getInts = map read . words <$> getLine

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)
     }
  }

done :: IO ()
done = return ()