/*
Jackson Simoneau
SI@UCF 2026 - Intro to Competitive Programming

Solution to Shrink: https://codeforces.com/problemset/problem/2117/B
*/

#include <bits/stdc++.h>
using namespace std;

int main() {
    //Process test cases
    int t; cin >> t;
    while(t--) {
        //Construct an optimal permutation
        //We will alternate filling in values on the left and right of the permutation
        int n; cin >> n;
        vector<int> res(n);

        //Keep track of left and right pointers
        //This lets us fill in the answer in linear time
        int lp = 0, rp = n-1;
        for(int i = 1; i <= n; i++) {
            //Insert and move the pointers
            res[lp] = i;
            lp++, i++;
            //If n is odd, exit the loop before n+1 gets inserted
            if(i > n) break;
            res[rp] = i;
            rp--;
        }

        //Display the constructed permutation
        for(int i = 0; i < n; i++) {
            cout << res[i] << ' ';
        }
        cout << endl;
    }
}