#include <iostream>
#include "vector"
#include "queue"
#include<algorithm> // for sort()

using namespace std;

typedef long long ll;
int T;
ll mod;

int main() {
    ios_base::sync_with_stdio(false);
    cin >> T;
    for (int t=0;t<T;t++){
        int n,k;
        cin >> n >> k;
        int tmp = 2*k - n;
        for (int i=1;i<tmp;i++){
            cout << i << " ";
        }
        int j=0;
        for (int i=tmp;i<=k;i++){
            cout << k-j << " ";
            j++;
        }
        cout << endl;
    }

}
