#include <bits/stdc++.h>
using namespace std;
using std::vector;
int main() {
  int n;
  int x;
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    vector<int> final;
    final.resize(x);
    final[0] = 1 + x / 2;
    for (int j = 1; j < x; j++) {
      if (j % 2 == 0) {
        final[j] = final[j - 1] + j;
      } else
        final[j] = final[j - 1] - j;
    }
    for (int k = 0; k < x; k++) {
      std::cout << final[k] << " ";
    }
    std::cout << endl;
  }
  return 0;
}
