#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const long long MAX = 5100000; const long long INF = 1LL << 60; const long long mod = 1000000007LL; //const long long mod = 998244353LL; using namespace std; typedef unsigned long long ull; typedef long long ll; int main() { /* cin.tie(nullptr); ios::sync_with_stdio(false); */ string res = "0000000000"; for (ll i = 0; i < 10; i++) { string tmp = res; ll mx = -1; char c; for (ll j = 0; j < 10; j++) { tmp[i] = (char)(j + '0'); cout << tmp << endl; ll X; string a; cin >> X >> a; if (a == "unlocked") return 0; if (mx < X) { mx = X; c = (char)(j + '0'); } } res[i] = c; } return 0; }