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