main :: IO ()
main = do ls <- getContents
          putStr (compose ls)

compose :: String -> String
compose = unlines . processLine . zip [1..] . lines

processLine :: [(Integer, String)] -> [String]
processLine [] = []
processLine ((n,x):xs) | x == "0" = []
                       | otherwise = ("Case " ++ show n ++ ": " ++ x) : processLine xs