fgen x i = "Case " ++ (show i) ++ ": " ++ (show x)
body :: Int -> IO ()
body i = do
         ln <- getLine
         let x = read ln :: Int
         if (x == 0) then return () else do
           putStrLn $ fgen x i
           body (i + 1)

main = body 1