import java.io.*; import java.util.*; import static java.lang.System.*; public class Main { static FastScanner sc = new FastScanner(System.in); public static void main(String[] args) { int[] key = new int[10]; int count = 0; out.println("0000000000"); count = sc.nextInt(); sc.next(); int i = 0; while (count < 10) { for (int j=1; j<=9; j++) { key[i] = j; output(key); int temp = sc.nextInt(); sc.next(); if (count < temp) { count = temp; break; } if (count > temp) { key[i]--; break; } } i++; } } static void output (int[]ar) { for (int i=0; i Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next());} public void close() { try {in.close();} catch (IOException e) {} } }