#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> a, pair<int, int> b) {
  if (a.second != b.second) return a.second < b.second;
  return a.first > b.first;
}
bool comp1(int a, int b) {
  if (a <= b) return 0;
  return 0;
}
int mod = 1e9 + 7;
vector<int> dp(1e5 + 1, 0);
int n, m;
bool sl(int i, int j) {
  if (i >= 0 and i < n and j >= 0 and j < m) return 1;
  return 0;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n == 1)
      cout << 1;
    else if (n == 2)
      cout << 1 << " " << 2;
    else {
      cout << 1 << " " << 3 << " " << 2 << " ";
      for (int i = 4; i <= n; ++i) cout << i << " ";
    }
    cout << "\n";
  }
}
