#include <bits/stdc++.h>

using namespace std;
#define int long long
bool local=false;
int z1;
int n;
vector <int> a;
mt19937 rnd;
int med(int x,int y,int z)
{
    vector <int> h={x,y,z};
    sort(h.begin(),h.end());
    return h[1];
}
int query(int u,int v,int w)
{
    cout<<"? "<<u+1<<' '<<v+1<<' '<<w+1<<endl;
    if(!local)
    {
        int ans;
        cin>>ans;
        return ans;
    }
    else
    {
        return med(abs(a[u]-a[v]),abs(a[v]-a[w]),abs(a[w]-a[u]));
    }
}
bool check(int x)
{
    //cout<<n<<" n "<<endl;
    if(x==z1) return false;
    int sum=0;
    for(int i=0;i<18;++i)
    {
        int u=rnd()%n;
        int v=rnd()%n;
        if(u==v || u==z1 || u==x || v==z1 || v==x) {i--;continue;}
        int res1=query(u,v,z1);int res2=query(u,v,x);
        if(res1==(res2+1) || res1==res2)
        {
            ++sum;
        }
    }
    //cout<<" trfe "<<endl;
    return (sum==18);
}
int32_t main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t;
    cin>>t;
    while(t--)
    {
        cin>>n;
        a.clear();
        rnd.seed(4824948+rnd());
        if(local)
        {
            for(int i=0;i<n;++i) a.push_back(i+1);
            shuffle(a.begin(),a.end(),default_random_engine(rand()+rnd()+6432));
            if(a[0]>a[1])
            {
                for(int i=0;i<n;++i) a[i]=(n+1-a[i]);
            }
        }
        int ans1=1e9;
        vector <int> z;
        for(int i=0;i<200;++i)
        {
            int u=rnd()%n;int v=rnd()%n;int w=rnd()%n;
            if(u!=v && v!=w && w!=u)
            {
                int r=query(u,v,w);
                if(r<ans1)
                {
                    ans1=r;
                    z={u,v,w};
                }
            }
        }
        vector <pair<int,int> > v;
        for(int x=0;x<n;++x)
        {
            if(x!=z[1] && x!=z[2])
            {
                int res1=query(x,z[1],z[2]);
                v.push_back({res1,x});
            }
        }
        sort(v.begin(),v.end());reverse(v.begin(),v.end());
        int pos1=v[0].second;
        z1=pos1;int z2=(-1);
        int pos2=v[1].second;
        int pos3=v[2].second;
        int pos4=v[3].second;
        //cout<<z[0]<<' '<<z[1]<<' '<<z[2]<<endl;
        //cout<<pos1<<' '<<pos2<<' '<<pos3<<' '<<pos4<<endl;
        {
            if(check(pos2)) {z2=pos2;}
            else if(check(pos3)) {z2=pos3;}
            else if(check(pos4)) {z2=pos4;}
            else if(check(z[1])) {z2=z[1];}
            else if(check(z[2])) {z2=z[2];}
        }
        if(z2==(-1)) assert(false);
        vector <int> ans(n);
        ans[z1]=1;
        ans[z2]=2;
        for(int i=0;i<n;++i)
        {
            if(i!=z1 && i!=z2)
            {
                ans[i]=query(z1,z2,i)+2;
            }
        }
        if(ans[0]>ans[1]) for(int i=0;i<n;++i) ans[i]=(n+1-ans[i]);
        if(local) {for(int i=0;i<n;++i) cout<<a[i]<<' ';
        cout<<endl;}
        cout<<"! ";
        for(int i=0;i<n;++i) cout<<ans[i]<<' ';
        cout<<endl;
        int res;
        cin>>res;
        if(res==(-1))
        {
            exit(0);
        }
    }
    return 0;
}

### Prompt

Please create a solution in CPP to the following problem:

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 <bits/stdc++.h>

using namespace std;
#define int long long
bool local=false;
int z1;
int n;
vector <int> a;
mt19937 rnd;
int med(int x,int y,int z)
{
    vector <int> h={x,y,z};
    sort(h.begin(),h.end());
    return h[1];
}
int query(int u,int v,int w)
{
    cout<<"? "<<u+1<<' '<<v+1<<' '<<w+1<<endl;
    if(!local)
    {
        int ans;
        cin>>ans;
        return ans;
    }
    else
    {
        return med(abs(a[u]-a[v]),abs(a[v]-a[w]),abs(a[w]-a[u]));
    }
}
bool check(int x)
{
    //cout<<n<<" n "<<endl;
    if(x==z1) return false;
    int sum=0;
    for(int i=0;i<18;++i)
    {
        int u=rnd()%n;
        int v=rnd()%n;
        if(u==v || u==z1 || u==x || v==z1 || v==x) {i--;continue;}
        int res1=query(u,v,z1);int res2=query(u,v,x);
        if(res1==(res2+1) || res1==res2)
        {
            ++sum;
        }
    }
    //cout<<" trfe "<<endl;
    return (sum==18);
}
int32_t main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t;
    cin>>t;
    while(t--)
    {
        cin>>n;
        a.clear();
        rnd.seed(4824948+rnd());
        if(local)
        {
            for(int i=0;i<n;++i) a.push_back(i+1);
            shuffle(a.begin(),a.end(),default_random_engine(rand()+rnd()+6432));
            if(a[0]>a[1])
            {
                for(int i=0;i<n;++i) a[i]=(n+1-a[i]);
            }
        }
        int ans1=1e9;
        vector <int> z;
        for(int i=0;i<200;++i)
        {
            int u=rnd()%n;int v=rnd()%n;int w=rnd()%n;
            if(u!=v && v!=w && w!=u)
            {
                int r=query(u,v,w);
                if(r<ans1)
                {
                    ans1=r;
                    z={u,v,w};
                }
            }
        }
        vector <pair<int,int> > v;
        for(int x=0;x<n;++x)
        {
            if(x!=z[1] && x!=z[2])
            {
                int res1=query(x,z[1],z[2]);
                v.push_back({res1,x});
            }
        }
        sort(v.begin(),v.end());reverse(v.begin(),v.end());
        int pos1=v[0].second;
        z1=pos1;int z2=(-1);
        int pos2=v[1].second;
        int pos3=v[2].second;
        int pos4=v[3].second;
        //cout<<z[0]<<' '<<z[1]<<' '<<z[2]<<endl;
        //cout<<pos1<<' '<<pos2<<' '<<pos3<<' '<<pos4<<endl;
        {
            if(check(pos2)) {z2=pos2;}
            else if(check(pos3)) {z2=pos3;}
            else if(check(pos4)) {z2=pos4;}
            else if(check(z[1])) {z2=z[1];}
            else if(check(z[2])) {z2=z[2];}
        }
        if(z2==(-1)) assert(false);
        vector <int> ans(n);
        ans[z1]=1;
        ans[z2]=2;
        for(int i=0;i<n;++i)
        {
            if(i!=z1 && i!=z2)
            {
                ans[i]=query(z1,z2,i)+2;
            }
        }
        if(ans[0]>ans[1]) for(int i=0;i<n;++i) ans[i]=(n+1-ans[i]);
        if(local) {for(int i=0;i<n;++i) cout<<a[i]<<' ';
        cout<<endl;}
        cout<<"! ";
        for(int i=0;i<n;++i) cout<<ans[i]<<' ';
        cout<<endl;
        int res;
        cin>>res;
        if(res==(-1))
        {
            exit(0);
        }
    }
    return 0;
}

```