#include <iostream>
#include <list>
#include <vector>
using namespace std;
const int maxn = 100;
int data[maxn];
int main() {
int t;
cin>>t;
while(t--) {
int n;
cin>>n;
for(int i=0;i<n;i++) data[i]=i+1;
int first = 0,rear = n-1;
while(rear-first>=1) {
cout<<data[first]<<" ";
data[++rear]=data[first+1];
first+=2;
}
cout<<data[rear]<<" "<<endl;
}
}
#include <iostream>
#include <list>
#include <vector>
using namespace std;
const int maxn = 100;
int data[maxn];
int main() {
int t;
cin>>t;
while(t--) {
int n;
cin>>n;
vector<int> V;
if(!V.empty())
V.clear();
for(int i=0;i<n;i++) V.push_back(i+1);
while(V.end()-V.begin()>=2) {
cout<<V[0]<<" ";
V.push_back(V[1]);
V.erase(V.erase(V.begin()));
}
if(!V.empty())
cout<<V[0]<<" "<<endl;
}
}