#include <bits/stdc++.h>
using namespace std;

using li = long long;
using vi = vector<li>;
using pi = pair<li, li>;
using vpi = vector<pi>;
using vvi = vector<vector<li>>;
using vvpi = vector<vpi>;
using ld = long double;

#define forn(i,n) for (li i = 0;i < li(n);i++)
#define ford(i,n) for (li i = li(n)-1;i >=0;i--)
#define fore(i,l,r) for (li i = li(l);i < li(r);i++)
#define forv(v,arr) for (auto& v : (arr))
#define all(a) (a).begin(),(a).end()

//#define x first
//#define y second

//using Point = pair<li, li>;
using Point = complex<li>;
//using Point = complex<ld>;

istream& operator>>(istream& in, vi& a)
{
	forv(v, a)
		in >> v;
	return in;
}

ostream& operator<<(ostream& out, vi& a)
{
	forv(v, a)
		out << v << " ";
	return out;
}

void solve()
{
	li n, l, r, s;
	cin >> n >> l >> r >> s;
	int k = r - l + 1;
	if (s < (k + 1) * k / 2 || s >(k + 1) * k / 2 + (n - k) * k)
	{
		cout << -1 << endl;
		return;
	}
	vi a(k);
	forn(i, k)
		a[i] = i + 1;
	li d = s - (k + 1) * k / 2;
	ford(i, k)
	{
		if (!d)
			break;
		li v = min(d, n - k);
		d -= v;
		a[i] += v;
	}
	l--, r--;
	set<li> st(all(a));
	vi val;
	forn(i, n)
		if (!st.count(i + 1))
			val.push_back(i + 1);
	forn(i, n)
	{
		if (i < l || i > r)
		{
			cout << val.back() << " ";
			val.pop_back();
			continue;
		}
		cout << a.back() << " ";
		a.pop_back();
	}
	cout << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int n;
	cin >> n;
	forn(i, n)
		solve();
}