import java.io.*; import java.util.*; import java.math.*; class Main { public static void out (Object o) { System.out.println(o); } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); for (int i = 0; i < 1000; i++) { String s = i + ""; while (s.length() < 3) s = "0" + s; out(s); String t; while ((t = br.readLine()) == null) {} if (t.equals("locked")) break; } } }