putCase :: Int -> IO ()
putCase i = do
  inputStr <- getLine
  let num = read inputStr
  if num == 0
  then return ()
  else do
    putStrLn $ "Case " ++ show i ++ ": " ++ inputStr
    putCase $ i + 1

main = putCase 1