#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<ctime> 
using namespace std;
int t,n,p[100005],a[100005],c[100005],q[100005],tans[100005];
#ifndef DEBUG
int query(int x,int y,int z)
{
	x=p[x],y=p[y],z=p[z];
	printf("? %d %d %d\n",x,y,z);
	fflush(stdout);
	int ans;
	scanf("%d",&ans);
	return ans;
}
#else
int b[100005];
inline int F(int x)
{
	return x>=0?x:-x;
}
int query(int x,int y,int z)
{
	x=p[x],y=p[y],z=p[z];
	int v[3];
	v[0]=F(b[x]-b[y]),v[1]=F(b[y]-b[z]),v[2]=F(b[z]-b[x]);
	sort(v,v+3);
//	printf("query:x=%d,y=%d,z=%d,v=%d\n",x,y,z,v[1]);
	return v[1];
}
#endif
int main()
{
#ifdef DEBUG
	freopen("CF1526F.in","r",stdin);
	freopen("CF1526F.out","w",stdout);
#endif
	srand(time(0));
	scanf("%d",&t);
	while(t--)
	{
		scanf("%d",&n);
#ifdef DEBUG
		for(int i=1;i<=n;i++)
			scanf("%d",&b[i]);
#endif
		for(int i=1;i<=n;i++)
			p[i]=i;
		while(1)
		{
			random_shuffle(p+1,p+n+1);
			for(int i=1;i<=n;i++)
				c[i]=0;
			int fl=1,qfl=0;
			for(int i=3;i<=n;i++)
			{
				q[i]=query(1,2,i);
				c[q[i]]++;
				if(c[q[i]]>=3) qfl=1;
				if(c[q[i]]>=3&&q[i]>=n/3-2)
				{
					fl=0;
					break;
				}
				if(i==30&&qfl==0)
				{
					int nw=0;
					for(int j=1;j<n/3-1;j++)
						if(c[j]) nw=1;
					if(!nw)
					{
						fl=0;
						break;
					}
				}
			}
			if(qfl==0)
			{
				int nw=0;
				for(int j=1;j<n/3-1;j++)
					if(c[j]) nw=1;
				if(!nw)
					fl=0;
			}
			if(fl) break;
		}
		int mx=-1,id=-1,id2=-1,id3=-1;
		for(int i=n;i;i--)
			if(c[i])
			{
				mx=i;
				break;
			}
		for(int i=1;i<=n;i++)
		{
			if(q[i]==mx) id=i;
			if(q[i]==mx-1)
			{
				if(id2==-1) id2=i;
				else id3=i;
			}
		}
/*#ifdef DEBUG
		printf("mx=%d,id=%d,id2=%d,id3=%d\n",mx,id,id2,id3);
		for(int i=1;i<=n;i++)
			printf("%d ",c[i]);
		printf("\n");
#endif */
		if(id3!=-1)
		{
			int q2=query(1,id,id2),q3=query(1,id,id3);
			if(q2>q3) id2=id3;
		}
		a[id]=1,a[id2]=2;
		for(int i=1;i<=n;i++)
		{
			if(i==id||i==id2) continue;
			a[i]=query(id,id2,i)+2;
		}
		for(int i=1;i<=n;i++)
			tans[p[i]]=a[i];
		if(tans[1]>tans[2])
		{
			for(int i=1;i<=n;i++)
				tans[i]=n+1-tans[i];
		}
		printf("! ");
		for(int i=1;i<=n;i++)
			printf("%d ",tans[i]);
		printf("\n");
		fflush(stdout);
		int q;
		scanf("%d",&q);
	}
	return 0;
}

### Prompt

Construct a CPP code solution to the problem outlined:

This is an interactive problem.

There is a secret permutation p (1-indexed) of numbers from 1 to n. More formally, for 1 ≤ i ≤ n, 1 ≤ p[i] ≤ n and for 1 ≤ i < j ≤ n, p[i] ≠ p[j]. It is known that p[1]<p[2].

In 1 query, you give 3 distinct integers a,b,c (1 ≤ a,b,c ≤ n), and receive the median of \{|p[a]-p[b]|,|p[b]-p[c]|,|p[a]-p[c]|\}.

In this case, the median is the 2-nd element (1-indexed) of the sequence when sorted in non-decreasing order. The median of \{4,6,2\} is 4 and the median of \{0,123,33\} is 33.

Can you find the secret permutation in not more than 2n+420 queries?

Note: the grader is not adaptive: the permutation is fixed before any queries are made.

Input

The first line of input contains a single integer t (1 ≤ t ≤ 1000) — the number of testcases.

The first line of each testcase consists of a single integer n (20 ≤ n ≤ 100000) — the length of the secret permutation.

It is guaranteed that the sum of n over all test cases does not exceed 100000.

Interaction

For each testcase, you begin the interaction by reading n.

To perform a query, output "? a b c" where a,b,c is the 3 indices you want to use for the query.

Numbers have to satisfy 1 ≤ a,b,c ≤ n and a ≠ b,b ≠ c,a ≠ c.

For each query, you will receive a single integer x: the median of \{|p[a]-p[b]|,|p[b]-p[c]|,|p[a]-p[c]|\}.

In case your query is invalid or you asked more than 2n+420 queries, the interactor will print "−1" and will finish interaction. You will receive Wrong answer verdict. Make sure to exit immediately to avoid getting other verdicts.

When you have determined the secret permutation, output "! p[1] p[2] ... p[n]". If the secret permutation is correct, the interactor will print "1". Otherwise, the interactor will print "-1" and will finish interaction. You will receive Wrong answer verdict. Make sure to exit immediately to avoid getting other verdicts.

After printing a query do not forget to output the end of line and flush the output. Otherwise, you will get Idleness limit exceeded verdict.

To do this, use:

  * fflush(stdout) or cout.flush() in C++;
  * System.out.flush() in Java;
  * flush(output) in Pascal;
  * stdout.flush() in Python;
  * see documentation for other languages.



Hacks:

To hack, use the following format of test:

The first line should contain a single integer t (1 ≤ t ≤ 1000) — the number of testcases.

The first line of each testcase should contain a single integer n (20 ≤ n ≤ 100000) — the length of the secret permutation.

The following line of should contain n integers p[1],p[2],p[3],…,p[n]. p[1]<p[2] and p must be a permutation of integers from 1 to n.

You must ensure that the sum of n over all testcases does not exceed 100000.

Example

Input


1
20

6

9

1

Output




? 1 5 2

? 20 19 2

! 9 10 19 7 16 18 11 14 15 6 20 8 17 4 5 3 12 2 13 1

Note

The secret permutation is \{9,10,19,7,16,18,11,14,15,6,20,8,17,4,5,3,12,2,13,1\}.

For the first query, the values of (a,b,c) is (1,5,2). Since p[1]=9, p[5]=16 and p[2]=10. The return value is the median of \{|9-16|,|16-10|,|9-10|\} which is 6.

For the second query, the values of (a,b,c) is (20,19,2). Since p[20]=1, p[19]=13 and p[2]=10. The return value is the median of \{|1-13|,|13-10|,|1-10|\} which is 9.

By some miracle, we have figured out that the secret permutation is \{9,10,19,7,16,18,11,14,15,6,20,8,17,4,5,3,12,2,13,1\}. We output it and receive 1 from the interactor, meaning that we have guessed the secret permutation correctly.

### Response

```cpp
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<ctime> 
using namespace std;
int t,n,p[100005],a[100005],c[100005],q[100005],tans[100005];
#ifndef DEBUG
int query(int x,int y,int z)
{
	x=p[x],y=p[y],z=p[z];
	printf("? %d %d %d\n",x,y,z);
	fflush(stdout);
	int ans;
	scanf("%d",&ans);
	return ans;
}
#else
int b[100005];
inline int F(int x)
{
	return x>=0?x:-x;
}
int query(int x,int y,int z)
{
	x=p[x],y=p[y],z=p[z];
	int v[3];
	v[0]=F(b[x]-b[y]),v[1]=F(b[y]-b[z]),v[2]=F(b[z]-b[x]);
	sort(v,v+3);
//	printf("query:x=%d,y=%d,z=%d,v=%d\n",x,y,z,v[1]);
	return v[1];
}
#endif
int main()
{
#ifdef DEBUG
	freopen("CF1526F.in","r",stdin);
	freopen("CF1526F.out","w",stdout);
#endif
	srand(time(0));
	scanf("%d",&t);
	while(t--)
	{
		scanf("%d",&n);
#ifdef DEBUG
		for(int i=1;i<=n;i++)
			scanf("%d",&b[i]);
#endif
		for(int i=1;i<=n;i++)
			p[i]=i;
		while(1)
		{
			random_shuffle(p+1,p+n+1);
			for(int i=1;i<=n;i++)
				c[i]=0;
			int fl=1,qfl=0;
			for(int i=3;i<=n;i++)
			{
				q[i]=query(1,2,i);
				c[q[i]]++;
				if(c[q[i]]>=3) qfl=1;
				if(c[q[i]]>=3&&q[i]>=n/3-2)
				{
					fl=0;
					break;
				}
				if(i==30&&qfl==0)
				{
					int nw=0;
					for(int j=1;j<n/3-1;j++)
						if(c[j]) nw=1;
					if(!nw)
					{
						fl=0;
						break;
					}
				}
			}
			if(qfl==0)
			{
				int nw=0;
				for(int j=1;j<n/3-1;j++)
					if(c[j]) nw=1;
				if(!nw)
					fl=0;
			}
			if(fl) break;
		}
		int mx=-1,id=-1,id2=-1,id3=-1;
		for(int i=n;i;i--)
			if(c[i])
			{
				mx=i;
				break;
			}
		for(int i=1;i<=n;i++)
		{
			if(q[i]==mx) id=i;
			if(q[i]==mx-1)
			{
				if(id2==-1) id2=i;
				else id3=i;
			}
		}
/*#ifdef DEBUG
		printf("mx=%d,id=%d,id2=%d,id3=%d\n",mx,id,id2,id3);
		for(int i=1;i<=n;i++)
			printf("%d ",c[i]);
		printf("\n");
#endif */
		if(id3!=-1)
		{
			int q2=query(1,id,id2),q3=query(1,id,id3);
			if(q2>q3) id2=id3;
		}
		a[id]=1,a[id2]=2;
		for(int i=1;i<=n;i++)
		{
			if(i==id||i==id2) continue;
			a[i]=query(id,id2,i)+2;
		}
		for(int i=1;i<=n;i++)
			tans[p[i]]=a[i];
		if(tans[1]>tans[2])
		{
			for(int i=1;i<=n;i++)
				tans[i]=n+1-tans[i];
		}
		printf("! ");
		for(int i=1;i<=n;i++)
			printf("%d ",tans[i]);
		printf("\n");
		fflush(stdout);
		int q;
		scanf("%d",&q);
	}
	return 0;
}

```