import java.util.*; import java.util.Map.Entry; import java.math.*; import java.awt.geom.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); boolean[] check = new boolean[10]; char[] say = new char[10]; for(int i = 0; i < 10; i++) { say[i] = '0'; } int pre = 0; boolean first = true; while(true) { System.out.println(String.valueOf(say)); int ans = sc.nextInt(); String res = sc.next(); if(ans == 10) break; if(first) { first = false; pre = ans; continue; } for(int i = 0; i < 10; i++) { if(!check[i]) { if(pre > ans) { say[i]--; check[i] = true; } else { say[i]++; } break; } } } } }