#include <bits/stdc++.h>
using namespace std;
mt19937 rng((int)std::chrono::steady_clock::now().time_since_epoch().count());
void haanji() {
  int n;
  cin >> n;
  vector<int> z;
  for (int i = 1; i <= n; i++) z.push_back(i);
  shuffle(z.begin(), z.end(), rng);
  for (int i = 0; i < n; i++) {
    cout << z[i] << " ";
  }
  cout << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    haanji();
  }
}
