#include "bits/stdc++.h"
#define ll long long
using namespace std;
void solve() {
	ll n, k;
	cin >> n >> k;
	if(n == 1) {
	    if(k == 1) {
	        cout << 1 << '\n';
	    } else {
	        cout << "-1\n";
	    }
	    return;
	}
	ll p = 1;
	for(int i = 1; p < k && i < n; ++i) {
		p *= 2;
	}
	if(p < k) {
		cout << "-1\n";
		return;
	}
	vector<ll> bits;
	for(int i = 0; i < n - 1; ++i) {
		if(i > 60) {
			bits.push_back(0);
		} else{
			bits.push_back(k >> i & 1);
		}
	}
	reverse(bits.begin(), bits.end());
	for(ll &x : bits) {
		x ^= 1;
	}
	int i = (int)bits.size() - 1;
	while(bits[i] == 1) --i;
	bits[i++] = 1;
	for(; i < (int)bits.size(); ++i) bits[i] = 0;
	bits.push_back(1);
	int lst = -1;
	vector<ll> ans;
	for(int i = 0; i < (int)bits.size(); ++i) {
		if(bits[i] == 1) {
			for(int x = i; x > lst; --x) {
				ans.push_back(x);
			}
			lst = i;
		}
	}
	for(int x : ans) {
		cout << x+1 << ' ';
	}
	cout << '\n';
}
int main() {
	ios::sync_with_stdio(0); cin.tie(0);
	int T = 1; cin >> T;
	while(T--) {
		solve();
	}
}