import Data.Functor( (<$>))
main = do
    inputs <- takeWhile ("0"/=) . words <$> getContents
    let
	almost_answer = zip [1..] inputs
	putStrLn4itp0103b (ix,n)
	  =
	    putStrLn $ "Case "++(show ix)++": "++n

    putStrLn4itp0103b `mapM_` almost_answer

