#include using namespace std; using ll = long long; #define rep(i,a) for(int i = 0; i < (a); ++i) template bool chmax(T &a,T b){if(a bool chmin(T &a,T b){if(a>b){a=b; return true;} return false;} int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; for(;t--;){ int n,x; cin >> n >> x; int sum = (1+n)*n/2; if(sum>x) cout << -1 << endl; else { for(int i=0;i