import Control.Monad import System.IO normalize = reverse . take 3 . reverse . ("00" ++) main = main' (map (normalize . show) [0..999]) where main' [] = mzero main' (p:ps) = do putStrLn p ack <- getLine hFlush stdout guard (ack == "unlocked") main' ps