#include int main() { char res[11] = { 0 }; char tmp[11] = { 0 }; for (int i = 0; i < 10; i++) tmp[i] = '0'; for (int i = 0; i < 10; i++) { int max = -1, index = -1; for (int j = 0; j < 10; j++) { tmp[i] += j; puts(tmp); fflush(stdout); int match; scanf("%d%*s", &match); if (match == 10) return 0; if (match > max) max = match, index = j; tmp[i] -= j; } res[i] = index + '0'; } puts(res); return 0; }