for i in 0..999 do printf("%03d\n", i); STDOUT.flush; if("unlocked" == gets.chomp) then break end end