
#include <bits/stdc++.h>
#define int long long
#define ld long double
#define vc vector
#define s second
#define f first

#define p(v) cout << #v << ": " << v << endl;
#define print(v) cout << #v << ": "; for (auto x : v )cout << x << " "; cout << endl;


//#include 'prettyprint.hpp'

using namespace std;


typedef pair <int, int> pii;


int xmax(int & a, int b){
    return a = max(a, b);
}
int xmin(int & a, int b){
    return a = min(a, b);
}



void do_test(){
    int n; cin >> n;
    int inti = -1;
    int insg = 0;
    int st;
    set <int > n_mag;
    for (int i=1; i<n; i++){
        cout << "? " << 1 << " " << n-i << endl;
        cout << i << endl;
        for (int j=i+1; j<=n; j++){
            cout << j << " ";
        }
        cout << endl;
        int f; cin >> f;
        if (f!=0){
            if (f< 0){
                st = abs(f)-1;
                insg = f;
                //st = abs(f)-1;
            }else{
                insg = f;
                st = abs(f)+1;

            }
            inti = i;
            break;
        }else{
            n_mag.insert(i);
        }
    }
   // st = insg;

   // vc <int> mag;
   //  p(insg);
   // insg--;

    for (int j = inti+1; j<n; j++){
        cout << "? 1 1" << endl;
        cout << inti << " " << j << endl;
        int f; cin >>f;
        if (f==0){
            n_mag.insert(j);
        }
        if (f < 0 ) insg++;
        if (f > 0 ) insg --;
    }
   // assert(inti < n);
 //  p(insg);
    if (insg == 0) n_mag.insert(n);
    assert(abs(insg)<=1);
   // p(insg);
    if (st ==0 && inti > 1){
        int mini = 0; int maxi = inti;
        while(mini+1!=maxi){
            int mid = (mini+maxi)/2;
            cout << "? " << mid << " 1" << endl;
            for (int i=1; i<=mid; i++){
                cout << i << " ";
            }
            cout << endl;
            cout << inti << endl;
            int f; cin >> f;
            if (f == 0){
                mini = mid;
            }else{
                maxi = mid;
            }
        }
        if(maxi != inti) n_mag.erase(maxi);
    }
    cout << "! ";
    cout << n_mag.size() << " ";
    for (auto x : n_mag) cout << x << " ";
    cout << endl;




}


signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int T; cin >> T;
    while(T--) do_test();
}

