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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.PriorityQueue;
import java.util.Stack;
import java.util.StringTokenizer;

public class Solution {
	static Stack<Integer> stack;
	public static void main ( String args [] ) throws IOException, InterruptedException {


		solve();}
	static int lis(int[] A, int n)		// Can be implemented with TreeSet (lower, remove, add)
	{
		ArrayList<Integer> L = new ArrayList<Integer>(); 
		int[] P = new int[n];			
		int[] L_id = new int[n];

		int lis = 0, lis_end = -1;
		for(int i = 0; i < n; ++i) 
		{
			int pos = Collections.binarySearch(L, A[i]);
			if (pos < 0) pos = -(pos + 1);

			if(pos >= L.size()) L.add(A[i]);
			else                 L.set(pos, A[i]);

			if(pos + 1 > lis)
			{
				lis = pos + 1;
				lis_end = i;
			}

			//lis_end and the following part for printing the solution
			L_id[pos] = i;
			P[i] = pos > 0 ? L_id[pos-1] : -1;
		}

		stack = new Stack<Integer>();
		while(lis_end != -1)
		{
			stack.push(lis_end);
			lis_end = P[lis_end];
		}
		return lis;
	}
	   static int findGCD(int arr[], int n) 
	    { 
	        int result = arr[0]; 
	        for (int i = 1; i < n; i++){ 
	            result = gcd(arr[i], result); 
	  
	            if(result == 1) 
	            { 
	               return 1; 
	            } 
	        } 
	  
	        return result; 
	    }
	   static int gcd(int a, int b) 
	    { 
	        if (a == 0) 
	            return b; 
	        return gcd(b % a, a); 
	    } 

	static long smallestDivisor(long n)  
	{  
		// if divisible by 2  
		if (n % 2 == 0)  
			return 2;  

		// iterate from 3 to sqrt(n)  
		for (int i = 3; i * i <= n; i += 2) {  
			if (n % i == 0)  
				return i;  
		}  

		return n;  
	} 
	static int binarySearch(int arr[], int x,int rep,boolean side) 
    { 
        int l = 0, r = arr.length - 1; 
        while (l <= r) { 
            int m = l + (r - l) / 2; 
  
            // Check if x is present at mid 
            if (arr[m] == x) {
            	arr[m]=rep;
                return m; 
            }
            // If x greater, ignore left half 
            if (arr[m] < x && side) { 
                l = m + 1; 
            }
            else {
            	side=true;
            	r = m - 1;
            }
  
            // If x is smaller, ignore right half 
             if(arr[m]>x && side ) {
                r = m - 1; 
             }else {
                 l = m + 1; 
                 side=true;
             }
           
        } 
  
        // if we reach here, then element was 
        // not present 
        return -1; 
    } 
	public static void solve() throws IOException, InterruptedException {
		Scanner sc = new Scanner(System.in);
		int t=sc.nextInt();
		for(int c=0;c<t;c++) {
			int n= sc.nextInt();
			int arr []=  new int[n];
			PriorityQueue<Pair> seg = new PriorityQueue<Pair>();
			seg.add(new Pair(0,n-1));
			int curr=1;
			while(!seg.isEmpty()) {
				Pair p = seg.poll();
				if(p.start==p.end) {
					arr[p.start]=curr;
					curr++;
				}else if((p.start+p.end)/2 == p.start) {
					arr[p.start]=curr;
					curr++;
					seg.add(new Pair(p.end,p.end));
				}else {
					int pos =(p.start+p.end)/2;
					arr[pos]=curr;
					curr++;
					seg.add(new Pair(p.start,pos-1));
					seg.add(new Pair(pos+1,p.end));
				}
			}
			for(int i=0;i<arr.length;i++) {
				System.out.print(arr[i]+" ");
			}
			System.out.println();
		}
		


	}































	static void shuffle(int[] a)
	{
		int n = a.length;
		for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}




}

@SuppressWarnings("rawtypes")
class Pair implements Comparable{
	int start;
	int end;



	

	public Pair(int x , int y) {
		this.start=x;
		this.end=y;
	}

	@Override
	public int compareTo(Object o) {
		Pair p = (Pair)o;
		if(this.end-this.start>p.end-p.start) return -1;
		if(this.end-this.start<p.end-p.start) return 1;
		if(this.start<p.start) return -1;
		if(p.start<this.start) return 1;
			
			
			
			
			
			return 0;
	}


}




class Scanner 
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

	public String next() throws IOException 
	{
		while (st == null || !st.hasMoreTokens()) 
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {return Integer.parseInt(next());}

	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}

	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}

	public boolean ready() throws IOException {return br.ready();}


}