#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void solve() { int n; long long x; std::cin >> n >> x; long long least = (n + 1) * n / 2; if (x < least) { std::cout << -1 << '\n'; return; } long long l = 1, r = x / n; while (l < r) { long long mid = (l + r) / 2; if ((mid + mid + n - 1) * n / 2 >= x) { r = mid; } else l = mid + 1; } long long diff = (l + l + n - 1) * n / 2 - x; std::vector ans(n); for (int i = n - 1; i >= 0; i--) { ans[i] = l++; } for (int i = n - 1, cnt = 0; i >= 0; i--) { if (cnt + 1 > diff) break; ans[i] -= 1; cnt++; } for (auto& x : ans) std::cout << x << ' '; std::cout << '\n'; } int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int t = 1; std::cin >> t; while (t--) { solve(); } }