main = do
  s <- getContents
  let list = takeWhile(/="0") $ lines $ s
  let iter l index = case l of
          [] -> return ()
          (x:xs) -> do
                  putStrLn $ "Case " ++ show index ++ ": "++ x;
                  iter xs (index+1)
  iter list 1