import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for(int i = 0; i < 1000; i++){ System.out.println(String.format("%03d",i)); if(sc.next().equals("unlocked")){ return; } } sc.close(); } }