#include using namespace std; typedef long long ll; int main(){ int collect, collect_max, ret_collect; int const digit = 10; string s, ans, ret_string; string const s0 = "0000000000"; for (int i = 0; i < digit; i++){ s = s0; collect = -1; for (int j = 0; j < digit; j++){ cout << s << endl; cin >> ret_collect >> ret_string; if (ret_string == "unlocked") return 0; else{ if (ret_collect > collect) collect_max = j; collect = ret_collect; } s[i]++; } ans += collect_max + '0'; } cout << ans << endl; return 0; }