import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String ans = ""; for(int i = 0; i < 10; i++) { int s = 0; int l = 0; for(int j = 0; j < 10; j++) { String t = ""; for(int k = 0; k < 10; k++) { if(j == i) { t += k; } else { t += 0; } } System.out.println(t); System.out.flush(); int L = sc.nextInt(); String str = sc.next(); if(l <= L) { s = j; l = L; } } ans += s; } System.out.println(ans); System.exit(0); } }