#include<bits/stdc++.h>
#define S second 
#define F first
#define all(x) x.begin(),x.end()
#define debug(x) cout<<x<<":"<<#x<<"\n";
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> pii;
const int maxn = 2e3+200;
int mark[maxn];
void ask(int l,int r){
	cout<<"? "<<l<<" "<<r<<endl;
}
void solve(){
	fill(mark,mark+maxn,0);
	int n,det,p,num=0,cnt=0,tmp;
	cin>>n;
	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;
		cin>>p;
		if(p != 0){
			det = i;
			tmp = abs(p);
			break;
		}
		mark[i] = 1;
		cnt++;
	}
	for(int i=det+1;i<n;i++){
		cout<<"? "<<1<<" "<<1<<endl;
		cout<<det<<endl;
		cout<<i<<endl;
		cin>>p;
		if(p == 0){
			mark[i] = 1;
			cnt++;
		}else{
			num++;
		}
	}
	if(num%2 == tmp%2){
		mark[n] = 1;
		cnt++;
	}
	int l=1,r=det;
	bool have=0;
	while(r-l>1){
		int mid = (l+r)>>1;
		ask(1,r-mid);
		cout<<det<<endl;
		for(int i=mid;i<r;i++){
			cout<<i<<" ";
		}cout<<endl;
		cin>>p;
		if(p == 0){
			r = mid;
		}else{
			l = mid;
			have = 1;
		}
	}
	if(have){
		mark[l] = 0;
		cnt--;
	}else{
		if(l != det){
			ask(1,1);
			cout<<det<<endl;
			cout<<l<<endl;
			cin>>p;
			if(p != 0){
				mark[l] = 0;
				cnt--;
			}
		}
	}
	cout<<"! "<<cnt<<" ";
	for(int i=1;i<=n;i++){
		if(mark[i]){
			cout<<i<<" ";
		}
	}
	cout<<endl;
}
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t;
	cin>>t;
	while(t--){
		solve();
	}
	return 0;
}