#include <bits/stdc++.h>
#define code                     \
    ios::sync_with_stdio(false); \
    cin.tie(0);                  \
    cout.tie(0);
#define int long long
#define endl '\n'
#define MM(a, b) memset(a, b, sizeof(a))
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;

#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1)
{
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&... args)
{
    const char *comma = strchr(names + 1, ',');
    cout.write(names, comma - names) << " : " << arg1 << " | ";
    __f(comma + 1, args...);
}

int32_t main()
{
    code;
    int t;
    cin >> t;
    while (t--)
    {
        int n, k;
        cin >> n >> k;
        vector<int> p(k);
        for (int i = 0; i < k; i++)
        {
            p[i] = i + 1;
        }
        n = n - k + 1;
        reverse(p.begin() + k - n, p.end());
        for (auto i : p)
            cout << i << " ";
        cout << endl;
    }
}
