#include using namespace std; string f(int a) { string res = ""; while (a) { res += (a % 10 + '0'); a /= 10; } while (res.size() < 3) res = "0" + res; return res; } int main(void) { for (int i = 0; i < 1000; i++) { string s = f(i); cout << s << endl; flush(cout); cin >> s; if (s == "unlocked") break; } return 0; }