import java.util.Scanner; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); for(int i=0; i<10; i++) { for(int j=0; j<10; j++) { for(int k=0; k<10; k++) { System.out.println(i + " " + j + " " + k); if(in.next().equals("unlocked")) { return; } } } } in.close(); } }