Problem: You have a sequence a with n elements 1, 2, 3, ..., k - 1, k, k - 1, k - 2, ..., k - (n - k) (k ≤ n < 2k).

Let's call as inversion in a a pair of indices i < j such that a[i] > a[j].

Suppose, you have some permutation p of size k and you build a sequence b of size n in the following manner: b[i] = p[a[i]].

Your goal is to find such permutation p that the total number of inversions in b doesn't exceed the total number of inversions in a, and b is lexicographically maximum.

Small reminder: the sequence of k integers is called a permutation if it contains all integers from 1 to k exactly once.

Another small reminder: a sequence s is lexicographically smaller than another sequence t, if either s is a prefix of t, or for the first i such that s_i ≠ t_i, s_i < t_i holds (in the first position that these sequences are different, s has smaller number than t).

Input

The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases.

The first and only line of each test case contains two integers n and k (k ≤ n < 2k; 1 ≤ k ≤ 10^5) — the length of the sequence a and its maximum.

It's guaranteed that the total sum of k over test cases doesn't exceed 10^5.

Output

For each test case, print k integers — the permutation p which maximizes b lexicographically without increasing the total number of inversions.

It can be proven that p exists and is unique.

Example

Input


4
1 1
2 2
3 2
4 3


Output


1 
1 2 
2 1 
1 3 2 

Note

In the first test case, the sequence a = [1], there is only one permutation p = [1].

In the second test case, the sequence a = [1, 2]. There is no inversion in a, so there is only one permutation p = [1, 2] which doesn't increase the number of inversions.

In the third test case, a = [1, 2, 1] and has 1 inversion. If we use p = [2, 1], then b = [p[a[1]], p[a[2]], p[a[3]]] = [2, 1, 2] and also has 1 inversion.

In the fourth test case, a = [1, 2, 3, 2], and since p = [1, 3, 2] then b = [1, 3, 2, 3]. Both a and b have 1 inversion and b is the lexicographically maximum.

Solution (in CPP):

Solution:
#pragma GCC optimize("O3")
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <iostream>
#include <iterator>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <sstream>
#include <fstream>
#include <ctime>
#include <cstring>
#include <stack>
#include <ctime>
#include <iomanip>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <bitset>

//#include <ext/pb_ds/assoc_container.hpp>

#define fi first
#define se second
#define th third

#define en "\n"
#define sqrt(n) sqrt((long double) n)
#define ALL(c) (c).begin() , (c).end()
#define MOD 998244353
#define MEM0(a) memset(a,0,sizeof(a))
#define FAST() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define FILES(name) name!=""?freopen(name".in","r",stdin),freopen(name".out","w",stdout):0
#define elif else if
#define SORT(x) sort(ALL(x))
#define REVERSE(x) reverse(ALL(x))
#define SZ(a) ((long long)((a).size()))
#define WHAT_IS(x) cerr << #x << " is " << x << en
#define TIMER (clock()*1.0/CLOCKS_PER_SEC)
#define int long long


using namespace std;

template<class A, class B, class C> struct triple { A first; B second; C third;
    bool operator<(const triple& t) const { if (first != t.first) return first < t.first; if (second != t.second) return second < t.second; return third < t.third; } };


typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef set<int> seti;
typedef long double ld;
typedef pair<ld, ld> pdd;
typedef triple<int, int, int> tiii;


const ld EPS=0.000000001;
const ld INFD32=1000000000;
const ll INF64=1000000000000000000;
const ll INF32=1000000001;
const ll one=1;

bool iss_ll(ll __1,ll __2){ return INF64/__1>=__2;}
bool equal(double _1,double _2){ return (abs(_1-_2)<EPS);}
bool iss_sqr(int &__1){ll __2=sqrt(__1); return __2*__2==__1;};
bool iss_prime(ll __1){for (int i=2; i*i<=__1; ++i) if (!(__1%i)) return 0; return 1;}
int gcd(int __1,int __2){ while (__1 && __2) if (__1>__2)  __1=__1%__2; else __2=__2%__1; return __1+__2;}
int lcm(int __1,int __2){ return __1*__2/(gcd(__1, __2));}
int sq_cube(ll x){if (x==0) return 1;int l=0,r=2e6;while (l+1<r){int m=(l+r)/2;if (m*m*m>x) r=m;else l=m;}return l;}
ll bp(ll a,ll b,ll md){ll res=1;while (b) {if (b&1) res*=a;a*=a;a%=md;res%=md;b>>=1;}return res;}
ll inv(ll x,ll md) {return bp(x, md - 2, md);}


void update_by_mod(int &x,int md){
    x%=md;
    if (x<0) x+=md;
}

void update_by_mod(int &x,int &y,int md){
    update_by_mod(x,md);
    update_by_mod(y,md);
}
void update_by_mod(int &x,int &y,int &z,int md){
    update_by_mod(x,md);
    update_by_mod(y,md);
    update_by_mod(z,md);
}
void update_by_mod(int &x,int &y,int &z,int &a,int md){
    update_by_mod(x,md);
    update_by_mod(y,md);
    update_by_mod(z,md);
    update_by_mod(a,md);
}

vector <int> z_function(string &s) {
    int n = SZ(s);
    vector<int> ans(n, 0);
    int l = 0, r = 0;
    for (int i = 1; i < n; ++i) {
        ans[i] = min(r - i + 1, ans[i - l]);
        while (ans[i] + i < n && s[ans[i]] == s[i + ans[i]]){
            ++ans[i];
        }
        if (i + ans[i] - 1 > r) {
            l = i, r = i + ans[i] - 1;
        }
        r = max(r, i);
    }
    return ans;
}

template <class T>
T sqr(T x){
    return x*x;
}

/*

#define maxN 500500

int fact[maxN],rfact[maxN];

void bld(int md) {
    fact[0] = 1;
    for (int i = 1; i < maxN; ++i) {
        fact[i] = fact[i - 1] * i % md;
    }
    rfact[maxN - 1] = bp(fact[maxN - 1], md - 2, md);
    for (int i = maxN - 2; i >= 0; --i) {
        rfact[i] = rfact[i + 1] * (i + 1) % md;
    }
}

int C(int n,int k,int md) {
    if (k > n) return 0;
    int res = fact[n];
    res *= rfact[k];
    res %= md;
    res *= rfact[n - k];
    res %= md;
    return res;
}

*/


#define maxN 500030

int md=1000000007;

int arr[maxN];

int cnt(vi v){
    int cnt=0;
    for (int i=0; i<v.size(); ++i){
        for (int j=i+1; j<v.size(); ++j)
            if (v[j]<v[i]) ++cnt;

    }
    return cnt;
}

void solve() {
    vi v;
    int n;
    cin>>n;
    int k;
    cin>>k;
    for (int i=1; i<=k; ++i) v.push_back(i);
    for (int i=k-1; i>=k-(n-k); --i){
        v.push_back(i);
    }
    int l=k-(n-k);
    vi ans;
    for (int i=1; i<l; ++i){
        ans.push_back(i);
    }
    for (int i=k; i>=l; --i){
        ans.push_back(i);
    }
    vi VEC;
    for (int i:v) VEC.push_back(ans[i-1]);
    //cout<<cnt(v)<<" "<<cnt(VEC)<<en;
    for (int i:ans) cout<<i<<" "; cout<<en;
}




signed main(void) {
    //look at the end
    srand(time(0));
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    //cerr<<TIMER<<en;
    int t = 1;
    cin >> t;
    for (int i = 1; i <= t; ++i) {
        //cout<<"Case #"<<i<<": ";
        solve();
    }
    cerr<<TIMER<<en;
    return 0;
}
//check special cases for example (n==1)
//check size  arrays