main :: IO ()
main = do
  xs <- (map atoi) <$> lines <$> getContents
  solve $ zip xs [1..]
  where
    atoi x = read x :: Int 

solve :: [(Int,Int)] -> IO ()
solve [] = return ()
solve ((0,_):_) = return ()  
solve ((x,i):xs) = do
  putStrLn $ "Case " ++ (show i) ++ ":" ++ (show x)
  solve xs