solveImpl :: Int -> [String] -> [String]
solveImpl _ [] = []
solveImpl _ ("0":_) = []
solveImpl a (x:xs) = ("Case " ++ show a ++ ": " ++ x) : solveImpl (a + 1) xs

solve :: [String] -> [String]
solve xs = solveImpl 1 xs

main :: IO ()
main  = getContents
    >>= return . lines
    >>= return . solve
    >>= mapM_ putStrLn