#include <iostream>
#include <algorithm>
using namespace std;
inline int gcd(int a, int b) {
    int Max = max(a, b);
    int Min = min(a, b);
    if (Max % Min == 0)
        return Min;
    else
        return gcd(Min, Max % Min);
}
inline int lcm(int a, int b) {
    return a * b / gcd(a, b);
}
int main()
{
    int t; cin >> t;
    int n, k;
    while (t--) {
        cin >> n >> k;
        int temp1 = k - (n - k);
        for (int i = 1; i < temp1; ++i)
            cout << i << " ";
        for (int i = k; i >= temp1; --i)
            cout << i << " ";
        cout << "\n";
    }
    return 0;
}

	  			    			 	  	  		 				  		