module Main where

    import Debug.Trace

    readLine:: IO [Int]
    readLine = fmap (map read . words) getLine
    
    while :: Int -> Int -> IO ()
    while n i = if n /= 0 
        then do
            putStrLn $ "Case "++show i++": "++ show n
            [n']    <- readLine
            while n' (i+1)
        else return ()

    main :: IO() 
    main = do
        let i = 1
        [n]    <- readLine
        while n i
    
