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)); int len = 10; char[] c = "**********".toCharArray(); char[] nums = {'0','1','2','3','4','5','6','7','8','9'}; for (int i = 0; i < len; i++) { for (int j = 0; j < len; j++) { c[i] = nums[j]; out(String.valueOf(c)); System.out.flush(); String[] line = br.readLine().split(" "); if (line[0].equals(i + 1 + "")) break; } } } }