#include <bits/stdc++.h>
using namespace std;
#define int              long long int
#define double           long double
#define print(a)         for(auto x : a) cout << x << " "; cout << endl


const int M = 1000000007;
const int N = 3e5+9;
const int INF = 2e9+1;
const int LINF = 2000000000000000001;

inline int power(int a, int b, int mod=M) {
    int x = 1;
    a %= mod;
    while (b) {
        if (b & 1) x = (x * a) % mod; 
        a = (a * a) % mod;
        b >>= 1;
    }
    return x;
}


//_ ***************************** START Below *******************************

//* Change this to false => before submitting to cf
// bool testing = true; 
bool testing = false;


int missing;

void hack(){
    cin >> missing;
    if(missing < 2 || missing > 999){
        cout << "Invalid missing" << endl;
    }
}

int  interactor(int x, int y){
    if(x>=missing) x++;
    if(y>=missing) y++;
    return x*y;
}



int askQuery(int x, int y){
    cout << "? " << x << " " << y << endl;

    if(testing){
        cout << interactor(x, y) << endl;
        return interactor(x,y);
    }
    int area;
    cin >> area;
    return area;
}


int consistency(){

    if(testing){
        hack();
    }


    int s = 2, e = 999;
    while(s<e){
        int m1 = s + (e-s)/3;
        int m2 = e - (e-s)/3;

        int res = askQuery(m1, m2);

        if(res == m1*m2){
            s = m2+1;
        }
        else if(res == m1*(m2+1)){
            s = m1+1;
            e = m2;
        }
        else{
            e = m1;
        }
    }

    return s;
}








void solve() {

    int ans = consistency();
    cout << "! " << ans << endl;

}





int32_t main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int t = 1;
    cin >> t;
    while(t--){
        solve();
    }


    return 0;
}