#include <bits/stdc++.h>
#define int long long

using namespace std;

signed main()
{
    int tt;
    cin >> tt;
    while (tt--)
    {
        int n, k;
        cin >> n >> k;
        int x = 2 * k - n;
        for (int i = 1; i < x; i++)
            cout << i << " ";
        for (int i = k; i >= x; i--)
            cout << i << " ";
        cout << endl;
    }
}