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