#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll P1 = 399999999;
const ll P2 = 400000000;
const ll MOD = P1 * P2;
ll t, rmd1, rmd2;
void exgcd(ll a,ll b,ll &x,ll &y)
{
if(!b){
x = 1, y = 0;
return;
}
exgcd(b, a % b, x, y);
ll t = x;
x = y, y = t - (a / b) * y;
}
ll op(ll r1, ll r2) {
ll ans = 0;
ll x = 0, y = 0;
exgcd(P2, P1, x, y);
if(x<0)
x += P1;
ans =(ans + P2 * x * r1 % MOD) % MOD;
x = 0, y = 0;
exgcd(P1, P2, x, y);
if(x<0)
x += P2;
ans =(ans + P1 * x * r2 % MOD) % MOD;
return ans;
}
int main() {
scanf("%lld", &t);
while (t--) {
printf("? %lld\n", P1);
cout << endl;
scanf("%lld", &rmd1);
if(rmd1 == -1) {
return 0;
}
printf("? %lld\n", P2);
cout << endl;
scanf("%lld", &rmd2);
if(rmd2 == -1) {
return 0;
}
if (rmd1 == rmd2) {
printf("! %lld\n", rmd1);
cout << endl;
}else{
printf("! %lld\n", op(rmd1, rmd2));
cout << endl;
}
}
return 0;
}