#include using namespace std; using ll = long long; template ostream& operator << (ostream& os, const vector& vec) { if(vec.empty()) return os; os << vec[0]; for(auto it = vec.begin(); ++it != vec.end(); ) os << ' ' << *it; return os; } template T MUL(T a, T b){ T res; return __builtin_mul_overflow(a, b, &res)? std::numeric_limits::max() : res; } long long arith_sum1(long long fst, long long n, long long d){ return MUL(n, MUL(2ll, fst) + MUL(n - 1, d)) / 2; } int main(){ ios::sync_with_stdio(false); cin.tie(0); int T; cin >> T; while(T--){ ll n, x; cin >> n >> x; if(x < n * (n + 1) / 2){ cout << -1 << '\n'; continue; } auto f = [&](ll v){ return MUL(v, v + 1) / 2; }; vector ans(n); for(int i = 0; i < n; i++){ ll ng = 0, ok = x, mid; ll r = (n - i) * (n - i - 1) / 2; while(ng + 1 < ok){ mid = (ok + ng) / 2; if(x - mid <= arith_sum1(mid - 1, n - i - 1, -1)) ok = mid; else ng = mid; } ans[i] = ok; x -= ok; } cout << ans << '\n'; } }