module Main where

import Control.Applicative
import Text.Printf

main :: IO ()
main = loop 1

loop :: Int -> IO()
loop i = do
  { [x] <- getInts
  ; if x == 0 then return ()
    else do
       { putStr $ printf "Case %d: %d\n" i x
       ; loop (i+1)
       }
  }

--

getInts :: IO[Int]
getInts = map read . words <$> getLine

putInts :: [Int] -> IO ()
putInts = putStrLn . unwords . map show


