Problem: You are given an array a of length n consisting of zeros. You perform n actions with this array: during the i-th action, the following sequence of operations appears:

  1. Choose the maximum by length subarray (continuous subsegment) consisting only of zeros, among all such segments choose the leftmost one; 
  2. Let this segment be [l; r]. If r-l+1 is odd (not divisible by 2) then assign (set) a[(l+r)/(2)] := i (where i is the number of the current action), otherwise (if r-l+1 is even) assign (set) a[(l+r-1)/(2)] := i. 



Consider the array a of length 5 (initially a=[0, 0, 0, 0, 0]). Then it changes as follows:

  1. Firstly, we choose the segment [1; 5] and assign a[3] := 1, so a becomes [0, 0, 1, 0, 0]; 
  2. then we choose the segment [1; 2] and assign a[1] := 2, so a becomes [2, 0, 1, 0, 0]; 
  3. then we choose the segment [4; 5] and assign a[4] := 3, so a becomes [2, 0, 1, 3, 0]; 
  4. then we choose the segment [2; 2] and assign a[2] := 4, so a becomes [2, 4, 1, 3, 0]; 
  5. and at last we choose the segment [5; 5] and assign a[5] := 5, so a becomes [2, 4, 1, 3, 5]. 



Your task is to find the array a of length n after performing all n actions. Note that the answer exists and unique.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 10^4) — the number of test cases. Then t test cases follow.

The only line of the test case contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the length of a.

It is guaranteed that the sum of n over all test cases does not exceed 2 ⋅ 10^5 (∑ n ≤ 2 ⋅ 10^5).

Output

For each test case, print the answer — the array a of length n after performing n actions described in the problem statement. Note that the answer exists and unique.

Example

Input


6
1
2
3
4
5
6


Output


1 
1 2 
2 1 3 
3 1 2 4 
2 4 1 3 5 
3 4 1 5 2 6 

Solution (in JAVA):

Solution:
import java.util.*;
import java.io.*;
public class Main {
        static public class InputIterator{
          ArrayList<String> inputLine = new ArrayList<String>(1024);
          int index = 0;
          int max;
          InputIterator(){
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            while(true){
              String read;
              try{
                read = br.readLine();
              }catch(IOException e){
                read = null;
              }
              if(read != null){
                inputLine.add(read);
              }else{
                break;
              }
            }
            max = inputLine.size();
          }
          public boolean hasNext(){return (index < max);}
          public String next(){
            if(hasNext()){
              String returnStr = inputLine.get(index);
              index++;
              return returnStr;
            }else{
              throw new IndexOutOfBoundsException("これ以上入力はないよ。");
            }
          }
        }
        
        static InputIterator ii = new InputIterator(); 
        static void myout(Object t){System.out.println(t);}
        static void myerr(Object t){System.err.println(t);}
        static String next(){return ii.next();}
        static int nextInt(){return Integer.parseInt(next());}
        static long nextLong(){return Long.parseLong(next());}
        static String[] nextStrArray(){return next().split(" ");}
        static String[] nextCharArray(){return mySplit(next());}
        static ArrayList<Integer> nextIntArray(){
          ArrayList<Integer> ret = new ArrayList<Integer>();
          String[] input = nextStrArray();
          for(int i = 0; i < input.length; i++){
            ret.add(Integer.parseInt(input[i]));
          }
          return ret;
        }
        static ArrayList<Long> nextLongArray(){
          ArrayList<Long> ret = new ArrayList<Long>();
          String[] input = nextStrArray();
          for(int i = 0; i < input.length; i++){
            ret.add(Long.parseLong(input[i]));
          }
          return ret;
        }
        
        static String[] mySplit(String str){return str.split("");}
        static String kaigyoToStr(String[] list){return String.join("\n",list);}
        static String kaigyoToStr(ArrayList<String> list){return String.join("\n",list);}
        static String hanSpToStr(String[] list){return String.join(" ",list);}
        static String hanSpToStr(ArrayList<String> list){return String.join(" ",list);}
        public static void main(String[] args){
          int t = nextInt();
          for(int i = 0; i < t; i++){
            int N = nextInt();
            String[] output = new String[N];
            PriorityQueue<Integer[]> pq = new PriorityQueue<>(new originComparator());
            int count = 1;
            Integer[] first = new Integer[2];
            first[0] = 1;
            first[1] = N;
            pq.add(first);
            while(pq.size() > 0){
              Integer[] tmp = pq.poll();
              int L = tmp[0];
              int R = tmp[1];
              int no;
              if((tmp[1] - tmp[0] + 1) % 2 == 1){
				no = (tmp[0] + tmp[1]) / 2;
			  }else{
				no = (tmp[0] + tmp[1] - 1) / 2;
			  }
              output[no - 1] = String.valueOf(count);
			  count++;
			  if(L == R){
				continue;
			  }else if(L + 1 == R){
                Integer[] pushQueue = new Integer[2];
                pushQueue[0] = R;
                pushQueue[1] = R;
				pq.add(pushQueue);
			  }else{
                Integer[] pushQueue1 = new Integer[2];
                pushQueue1[0] = no + 1;
                pushQueue1[1] = R;
                pq.add(pushQueue1);
                Integer[] pushQueue2 = new Integer[2];
                pushQueue2[0] = L;
                pushQueue2[1] = no - 1;
                pq.add(pushQueue2);
			  }
            }
            myout(hanSpToStr(output));
          }
        }
        //Method addition frame start
public static class originComparator implements Comparator<Integer[]>{
        public int compare(Integer[] mae, Integer[] ato){
                if(mae[1] - mae[0] == ato[1] - ato[0]){
                  return mae[0] - ato[0];
                }else{
                  return (ato[1] - ato[0]) - (mae[1] - mae[0]);
                }
        }
}
        //Method addition frame end
}