/*Every day, the words cross my mind. "If I had done this back then..." but they don't take the sincere form of regret. The words are just an excuse that come to my mind then disappear.*/ #include #define MAX 200005 #define inf 10000000000000000 #define ll long long #define eps 0.00000000001 #define MOD 1000000007 #define s(x) scanf("%d", &x); using namespace std; ll a[MAX]; void rec( int idx) { if(idx == 1) { } else if( idx == 2 ) { } else { cout << idx << endl; ll y = ((ll) idx * ( (ll) idx - 1)) /2; } } int main() { int q; cin >> q; while(q--) { ll len , c1; cin >> len >> c1; ll x = (len * (len - 1))/2; if(len == 1) { if(c1 == 0) { cout << 1 << endl; } else { cout << -1 << endl; } return 0; }else if(c1 > x ) { cout << -1 << endl; return 0; } else if (n >= 2 && n <= 34 && c1 < (1LL <<(n-2))) { cout << -1 << endl; return 0; } else { if(c1 == (len *(len - 1))/2 ) { for(int i = 0; i < n; i++) { cout << i + 1 << " "; } cout << endl; } else { for(int i =0; i < n; i++) { cout << i + 1 << " "; } cout << endl; } } } return 0; }