main = solve

solve = answer 1

answer :: Int -> IO ()
answer i = do
    n <- readLn
    printResult i n
    where
        printResult i n
            | n == 0 = return ()
            | otherwise = do
                putStrLn $ "Case " ++ show i ++ ": " ++ show n
                answer . (+1) $ i