#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); std::mt19937 rand2(static_cast(time(nullptr))); std::uniform_int_distribution dist(0, 999); while (1) { int keyNo = dist(rand2); cout << setfill('0') << setw(3); cout << keyNo << endl; string s; cin >> s; if (s == "unlocked") return 0; } }