#include <bits/stdc++.h>
#define pb push_back
#define pf push_front
#define fi first
#define se second

using namespace std;
typedef long long ll;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	ll t, n, k;
	cin >> t;
	while(t--)
    {
        cin >> n >> k;
        for(ll i=1; i<2*k-n; i++)
        {
            cout << i << " ";
        }
        for(ll i=k; i>=2*k-n; i--)
        {
            cout << i << " ";
        }
        cout << "\n";
    }
}
