/** author: shobonvip created: 2025.08.22 22:33:26 **/ #include using namespace std; //* ATCODER #include using namespace atcoder; typedef modint998244353 mint; //*/ /* BOOST MULTIPRECISION #include using namespace boost::multiprecision; //*/ typedef long long ll; #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define rrep(i, s, n) for (int i = (int)(n)-1; i >= (int)(s); i--) #define all(v) v.begin(), v.end() template bool chmin(T &a, const T &b) { if (a <= b) return false; a = b; return true; } template bool chmax(T &a, const T &b) { if (a >= b) return false; a = b; return true; } template T max(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmax(ret, a[i]); return ret; } template T min(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmin(ret, a[i]); return ret; } template T sum(vector &a){ T ret = 0; for (int i=0; i<(int)a.size(); i++) ret += a[i]; return ret; } int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int x,y; auto ask=[&](char c) -> int { map mp; rep(num,0,31){ cout<<'?'<<' '<>w; mp[w]++; } int tar=-1; int val=-1; for(auto[x,y]:mp){ if(chmax(tar,y))val=x; } return val; }; map kakuno; kakuno['A']=ask('A'); kakuno['B']=ask('B'); kakuno['C']=0; auto add=[&](char a,char b,char c) -> void { kakuno[c]=kakuno[a]+kakuno[b]; while(true){ cout<<'+'<<' '<>w;assert(w==0); if(ask(c)==kakuno[c])break; } return; }; x=kakuno['A']; y=kakuno['B']; vector a; while(x>0){ a.push_back(x&1); x>>=1; } reverse(all(a)); char c='B'; rep(i,1,(int)a.size()){ if(c=='B'){add(c,c,'C');c='C';} else if(c=='A'){add(c,c,'C');c='C';} else if(c=='C'){add(c,c,'A');c='A';} if(a[i]==1){ if(c=='A'){add(c,'B','C');c='C';} else if(c=='C'){add(c,'B','A');c='A';} } } cout<<'!'<<' '<