#include <bits/stdc++.h> #define ll long long int #define ld long double using namespace std; void mainSolve() { int n; cin >> n; vector<int> v(n); int s(0), e(n - 1); int cnt = n; while (s < e) { v[s++] = cnt--; v[e--] = cnt--; } if (n % 2 == 1) v[s] = cnt; for (int x : v) cout << x << " "; cout << endl; } int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t; cin >> t; while (t--) { mainSolve(); } return 0; }