#include <cassert>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include <vector>
#include <string>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <map>
#include <utility>
#include <algorithm>
#include <iostream>
#include <sstream>
using namespace std;

#define SIZE(x) int((x).size())
#define REP(i,c) for(auto &i : c)
typedef long long i64;
typedef unsigned long long u64;
const double EPS = 1e-12;
const int INF = 999999999;
typedef vector<int> VI;
typedef vector<string> VS;

int n;

int Query(int x,int l,int r) {
    printf("? 1 %d\n",r-l+1);
    printf("%d\n",x);
    for(int i=l;i<=r;i++) printf("%d ",i);
    printf("\n");
    fflush(stdout);
    int res;
    scanf("%d",&res);
    return res;
}

void Solve() {
    scanf("%d",&n);
    int p=-1;
    for(int i=2;i<=n;i++) {
        int r=Query(i,1,i-1);
        if(r!=0) {
            p=i;
            break;
        }
    }

    int low=1,high=p-1;
    while(low<high) {
        int mid=(low+high)>>1;
        int r=Query(p,1,mid);
        if(r!=0) {
            high=mid;
        } else {
            low=mid+1;
        }
    }

    VI ans;
    for(int i=1;i<p;i++) if(i!=low) ans.push_back(i);
    for(int i=p+1;i<=n;i++) {
        int r=Query(p,i,i);
        if(r==0) ans.push_back(i);
    }
    printf("! %d",SIZE(ans));
    REP(i,ans) printf(" %d",i);
    printf("\n");
    fflush(stdout);
}

int main() {
    int t;
    scanf("%d", &t);
    for (int i = 0; i < t; ++i) {
        Solve();
    }

    return 0;
}
