-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU import Data.List import Text.Printf main = f 0 where f n = printf "%03d\n" (n::Int) >> getLine >>= \s -> case s of "locked" -> f (n + 1) _ -> return ()