//Noszály Áron 8a Debreceni Fazekas Mihály Gimnázium

#include<bits/stdc++.h>
#include<cstdlib>

using namespace std;

typedef long long ll;
typedef unsigned long long ul;
typedef long double ld;

#define all(s) (s).begin(),(s).end()
#define pb push_back
#define IO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define INF std::numeric_limits<int>::max()
#define MINF std::numeric_limits<int>::min()
#define tmax(a,b,c) max((a),max((b),(c)))
#define tmin(a,b,c) min((a),min((b),(c)))
#define vpii vector<pair<int,int>>
#define vpll vector<pair<ll,ll>>
#define mp make_pair
#define xx first
#define yy second

#ifndef ONLINE_JUDGE
#  define LOG(x) (cerr << #x << " = " << (x) << endl)
#else
#  define LOG(x) ((void)0)
#endif

const long double PI = acos(-1);

int d1[4][2]={{0,1},{1,0},{0,-1},{-1,0}};
int d2[8][2]={{1,0},{0,1},{0,-1},{-1,0},{1,1},{-1,1},{1,-1},{-1,-1}};

int main()
{
	IO;
	int T;cin>>T;
	while(T--)
	{
		int n;cin>>n;
		vector<int> all;
		for(int i=1;i<=n;++i)
		{
			all.pb(i);
		}
		
		while(all.size()!=1)
		{
			if(all.size()==2) break;
			vector<int> l,r,m;int c=0;
			while(l.size()<(all.size()/3))
			{
				l.pb(all[c]);c++;
			}
			while(r.size()<(all.size()/3))
			{
				r.pb(all[c]);c++;
			}
			while(c<all.size())
			{
				m.pb(all[c]);c++;
			}
	
			cout<<"Test ";
			for(auto i:l)
			{
				cout<<i<<" ";
			}
			for(auto i:r)
			{
				cout<<i<<" ";
			}
			cout<<"\n";
			cout.flush();
			int ans;cin>>ans;
			if(ans==1)
			{
				all=l;
			}else if(ans==0)
			{
				all=m;
			}else {
				all=r;
			}
		}
		if(all.size()==2)
		{
			cout<<"Test "<<all[0]<<" "<<all[1]<<"\n"<<flush;
			int ans;cin>>ans;
			assert(ans!=0);
			if(ans==1)
			{
				all={all[0]};
			}else {
				all={all[1]};
			}
		}
		cout<<"Answer "<<all[0]<<"\n";
		cout.flush();
	}
	return 0;
}


