#include #include #include #include #include #include #include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); string ans = "0000000000", res; int n; cout << ans << endl; cout.flush(); cin >> n >> res; for(int i = 0; i < 10; i++) { int maxj, maxn = -1; for(int j = 0; j < 10; j++) { ans[i] = '0' + j; cout << ans << endl; cout.flush(); cin >> n >> res; if(maxn < n) { maxj = j; maxn = n; } } ans[i] = '0' + maxj; } cout << ans << endl; }