import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int [] ans = new int [10]; int k=0; print(ans); String S = sc.nextLine(); if("10 unlocked".equals(S))return; String [] arr = S.split(" "); int X = Integer.parseInt(arr[0]); while(k<10){ for(int i=1; i<10; i++){ ans[k]=i; print(ans); String tmp = sc.nextLine(); String [] arrtmp = tmp.split(" "); int Y = Integer.parseInt(arrtmp[0]); if(Y==10)return; if(XY){ ans[k]=0; k++; break; } } } } static void print(int [] A){ for(int i=0; i<10; i++){ System.out.print(A[i]); } System.out.println(); System.out.flush(); } }