#include <bits/stdc++.h>
using namespace std;
bool isprime(long long n) {
  if (n == 1) return true;
  if (n == 2 || n == 3) return true;
  if (n % 2 == 0) return false;
  for (long long i = 3; i * i <= n; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
int gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
set<long long> fac;
void allFactors(long long n) {
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      fac.insert(i);
      if (i != n / i) {
        fac.insert(n / i);
      }
    }
  }
}
bool threefactors(long long n) {
  long long p = sqrt(n);
  if (p * p == n) {
    if (isprime(p))
      return 1;
    else
      return 0;
  } else
    return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int w;
  cin >> w;
  while (w--) {
    int n;
    cin >> n;
    for (int i = 1; i <= n; i += 2) {
      cout << i << " ";
    }
    for (int i = 2; i <= n; i += 2) cout << i << " ";
    cout << endl;
  }
  return 0;
}
