#include<bits/stdc++.h>
#define pii pair<int, int>
#define LL long long
#define mp make_pair
#define pb push_back
using namespace std;
int n, k;
int main() {
	#ifdef DEBUG
	freopen("text.in", "r", stdin);
	#endif
	int T;
	scanf("%d", &T);
	while (T--) {
		scanf("%d%d", &n, &k);
		int len = 2 * k - n - 1;
		for (int i = 1; i <= len; ++i)
			printf("%d ", i);
		for (int i = k; i > len; --i)
			printf("%d ", i);
		printf("\n");
	}
	return 0;
}

