#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define MAXX 100005
#define FAST ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define pb push_back
#define fixx(n) fixed << setprecision(n)
#define F first
#define S second
#define ll long long   int
const int mod = 1e9 + 1 ;
 

 
signed main() {
    int t;
    cin >> t;
    while(t --) {
        int n, k;
        cin >> n >> k;
        bool f = false;
        int spp = k - (n - k + 1);
        for(int i = 1; i <= spp; i++){
            cout << i << " ";
        }

        for(int i = k; i >= spp + 1; i --){
            cout << i << " ";
        }
        
        cout << '\n';
    }
}