#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<int> p;
    for (int i = k - 1; i > k - 1 + n - k; i--) {
      cout << i << " ";
    }
    cout << endl;
  }
  return 0;
}
