1. #include <bits/stdc++.h>
  2. #define ll long long int
  3. #define ld long double
  4. using namespace std;
  5.  
  6. void mainSolve()
  7. {
  8. int n;
  9. cin >> n;
  10. vector<int> v(n);
  11. int s(0), e(n - 1);
  12. int cnt = n;
  13. while (s < e)
  14. {
  15. v[s++] = cnt--;
  16. v[e--] = cnt--;
  17. }
  18. if (n % 2 == 1)
  19. v[s] = cnt;
  20. for (int x : v)
  21. cout << x << " ";
  22. cout << endl;
  23. }
  24.  
  25. int main()
  26. {
  27. #ifndef ONLINE_JUDGE
  28. freopen("input.txt", "r", stdin);
  29. freopen("output.txt", "w", stdout);
  30. #endif
  31. int t;
  32. cin >> t;
  33. while (t--)
  34. {
  35. mainSolve();
  36. }
  37. return 0;
  38. }