#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 pn; cout << ans << endl; cout.flush(); cin >> pn >> res; //if(res == "unlocked") return 0; for(int i = 0; i < 10; i++) { int n, maxj, maxn = -1; for(int j = 0; j < 10; j++) { ans[i] = '0' + j; cout << ans << endl; cout.flush(); cin >> n >> res; //if(res == "unlocked") return 0; if(maxn == -1 || maxn < n) { maxj = j; maxn = n; } } ans[i] = '0' + maxj; } cout << ans << endl; cout.flush(); }