import java.util.Scanner; public class Test { public static Scanner sc = new Scanner(System.in); public static void main(String[] args) { byte[] n = new byte[10]; System.out.println("0000000000"); int cnt = sc.nextInt(), tmp; String s = sc.next(); if (cnt == 10) { return; } for (int i = 0; i < 10; i++) { for (int j = 1; j < 10; j++) { n[i] = (byte)j; for (int k = 0; k < 10; k++) { System.out.print(n[i]); } System.out.println(); tmp = sc.nextInt(); s = sc.next(); if (tmp == 10) { return; } if (cnt != tmp) { if (cnt > tmp) { n[i]--; } break; } } } } }