This is an interactive problem.

Upon clearing the Waterside Area, Gretel has found a monster named Genokraken, and she's keeping it contained for her scientific studies.

The monster's nerve system can be structured as a tree† of 𝑛 nodes (really, everything should stop resembling trees all the time…), numbered from 0 to 𝑛−1, with node 0 as the root.

Gretel's objective is to learn the exact structure of the monster's nerve system — more specifically, she wants to know the values 𝑝1,𝑝2,…,𝑝𝑛−1 of the tree, where 𝑝𝑖 (0≤𝑝𝑖<𝑖) is the direct parent node of node 𝑖 (1≤𝑖≤𝑛−1).

She doesn't know exactly how the nodes are placed, but she knows a few convenient facts:

If we remove root node 0 and all adjacent edges, this tree will turn into a forest consisting of only paths‡. Each node that was initially adjacent to the node 0 will be the end of some path.
The nodes are indexed in a way that if 1≤𝑥≤𝑦≤𝑛−1, then 𝑝𝑥≤𝑝𝑦.
Node 1 has exactly two adjacent nodes (including the node 0).



The tree in this picture does not satisfy the condition, because if we remove node 0, then node 2 (which was initially adjacent to the node 0) will not be the end of the path 4−2−5.	The tree in this picture does not satisfy the condition, because 𝑝3≤𝑝4 must hold.	The tree in this picture does not satisfy the condition, because node 1 has only one adjacent node.
Gretel can make queries to the containment cell:

"? a b" (1≤𝑎,𝑏<𝑛, 𝑎≠𝑏) — the cell will check if the simple path between nodes 𝑎 and 𝑏 contains the node 0.
However, to avoid unexpected consequences by overstimulating the creature, Gretel wants to query at most 2𝑛−6 times. Though Gretel is gifted, she can't do everything all at once, so can you give her a helping hand?

†A tree is a connected graph where every pair of distinct nodes has exactly one simple path connecting them.

‡A path is a tree whose vertices can be listed in the order 𝑣1,𝑣2,…,𝑣𝑘 such that the edges are (𝑣𝑖,𝑣𝑖+1) (1≤𝑖<𝑘).

Input
Each test consists of multiple test cases. The first line contains a single integer 𝑡 (1≤𝑡≤500) — the number of test cases. The description of the test cases follows.

The first line of each test case contains a single integer 𝑛 (4≤𝑛≤104) — the number of nodes in Genokraken's nerve system.

It is guaranteed that the sum of 𝑛 over all test cases does not exceed 104.

Interaction
For each test case, interaction starts by reading the integer 𝑛.

Then you can make queries of the following type:

"? a b" (without quotes) (1≤𝑎,𝑏<𝑛, 𝑎≠𝑏).
After the query, read an integer 𝑟 — the answer to your query. You are allowed to use at most 2𝑛−6 queries of this type.

If the simple path between nodes 𝑎 and 𝑏 does not contain node 0, you will get 𝑟=0.
If the simple path between nodes 𝑎 and 𝑏 contains node 0, you will get 𝑟=1.
In case you make more than 2𝑛−6 queries or make an invalid query, you will get 𝑟=−1. You will need to terminate after this to get the "Wrong answer" verdict. Otherwise, you can get an arbitrary verdict because your solution will continue to read from a closed stream.
When you find out the structure, output a line in the format "! 𝑝1 𝑝2…𝑝𝑛−1" (without quotes), where 𝑝𝑖 (0≤𝑝𝑖<𝑖) denotes the index of the direct parent of node 𝑖. This query is not counted towards the 2𝑛−6 queries limit.

After solving one test case, the program should immediately move on to the next one. After solving all test cases, the program should be terminated immediately.

After printing any query do not forget to output an end of line and flush the output buffer. Otherwise, you will get Idleness limit exceeded. 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.
The interactor is non-adaptive. The tree does not change during the interaction.

Hacks

For hack, use the following format:

The first line contains a single integer 𝑡 (1≤𝑡≤500) — the number of test cases. The description of the test cases follows.

The first line of each test case contains a single integer 𝑛 (4≤𝑛≤104) — the number of nodes in Genokraken's nerve system.

The second line of each test case contains 𝑛−1 integers 𝑝1,𝑝2,…,𝑝𝑛−1 (0≤𝑝1≤𝑝2≤…≤𝑝𝑛−1≤𝑛−2, 0≤𝑝𝑖<𝑖) — the direct parents of node 1, 2, ..., 𝑛−1 in the system, respectively.

In each test case, the values 𝑝1,𝑝2,…,𝑝𝑛−1 must ensure the following in the tree:

If we remove root node 0 and all adjacent edges, this tree will turn into a forest consisting of only paths. Each node that was initially adjacent to the node 0 will be the end of some path.
Node 1 has exactly two adjacent nodes (including the node 0).
The sum of 𝑛 over all test cases must not exceed 104.

Example
inputCopy
3
4

1

5

1

0

9

outputCopy


? 2 3

! 0 0 1

? 2 3

? 2 4

! 0 0 1 2

! 0 0 0 1 3 5 6 7
Note
In the first test case, Genokraken's nerve system forms the following tree:


The answer to "? 2 3" is 1. This means that the simple path between nodes 2 and 3 contains node 0.
In the second test case, Genokraken's nerve system forms the following tree:


The answer to "? 2 3" is 1. This means that the simple path between nodes 2 and 3 contains node 0.
The answer to "? 2 4" is 0. This means that the simple path between nodes 2 and 4 doesn't contain node 0.
In the third test case, Genokraken's nerve system forms the following tree:

The following solution is wrong #include <iostream>
#include <vector>
#include <algorithm>

using namespace std;
typedef long long ll;
#define endl '\n'

int query(int u, int v) {
  cout << "? " << u << " " << v << endl;
  cout.flush();
  int res; cin >> res;
  return res;
}

void solve() {
  int n; cin >> n;
  
  vector<int> p(n, -1);
  p[1] = 0;
  
  
  int child = -1;
  for(int i = 2; i < n; ++i){
    int res = query(1, i);
    if(res == 0){
      p[i] = 1;
      child = i;
      break;
    }
  }
  
  if(child != -1){
    int last = child;
    while(true){
      bool found = false;
      for(int i = 2; i < n; ++i){
        if(p[i] == -1){
          int res = query(last, i);
          if(res == 0){
            p[i] = last;
            last = i;
            found = true;
            break;
          }
        }
      }

      if(!found) break;
    }
  }
  
  for(int i = 1; i < n; ++i){
    if(p[i] == -1) p[i] = 0;
  }
  
  cout << "!";
  for(int i = 1; i < n; ++i){
    cout << " " << p[i];
  }
  cout << endl; 
  cout.flush();
}

int main(){
  ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  int t; cin >> t;
  while(t--) solve();
}