#include <bits/stdc++.h>
using namespace std;
void test_case() {
  int n;
  cin >> n;
  vector<int> a;
  for (int i = n; i >= 1; i -= 2) {
    a.push_back(i);
  }
  for (int i = n - 1; i >= 1; i -= 2) {
    a.push_back(i);
  }
  for (int x : a) {
    cout << x << " ";
  }
  cout << "\n";
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    test_case();
  }
  return 0;
}
