#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; int Q; cin >> Q; int N,M; cin >> N >> M; if(s == "Bob") swap(N,M); vector> X(N); int idx = 0; for(auto &[x,p] : X) cin >> x,p = idx++; sort(X.begin(),X.end()); auto share = [&](int pos) -> int { if(Q == 0) exit(0); assert(Q > 0),Q--; cout << "share " << pos+1 << endl; int ret; cin >> ret; if(ret == -1) assert(false); return ret; }; auto answer = [&](int x) -> void {cout << "answer " << x << endl; exit(0);}; int low = share(X.at(0).second),high = share(X.back().second); if(low == high && X.at(0).first == X.back().first){ if(N > M) answer(X.at(0).first); else answer(low); } else if(low == high){ for(int i=0; i V; for(int i=l1; i= v2){ int u = r1-m1-1,d = m2-l2; up += u,len1 -= u,r1 -= u; down += d,len2 -= d,l2 += d; } else{ int u = r2-m2-1,d = m1-l1; up += u,len2 -= u,r2 -= u; down += d,len1 -= d,l1 += d; } } } }