for i = 0, 999 do io.write(string.format("%03d\n", i)) a = nil while(a == nil) do a = io.read() end if(a == "unlocked") then break end end