/*
 * yaswanth phani kommineni
 */
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define endl '\n'

void solve(){
	ll n,l,r,s;
	cin >> n >> l >> r >> s;
	l--;r--;
	ll m = (r-l+1);
	vector <ll> v(m);
	ll k = 0;
	for(ll i=0;i<m;i++){
		v[i] = i+1;
		k += v[i];
	}
	if(k>s){
		cout << -1 << endl;
		return;
	}
	ll j=m-1;
	while(k != s){
		v[j]++;
		k++;
		j = (j-1+m)%m;
	}
	for(ll i=0;i<m;i++){
		if(v[i]>n){
			cout << -1 << endl;
			return;
		}
	}
	set <ll> used;
	for(auto x : v){
		used.insert(x);
	}
	ll cur = 1;
	vector <ll> ans(n);
	for(ll i=0;i<n;i++){
		if(i>=l && i<=r){
			ans[i] = v[i-l];
		}
		else{
			while(used.find(cur) != used.end()){
				cur++;
			}
			ans[i] = cur;
			cur++;
		}
	}
	for(auto x : ans){
		cout << x << " ";
	}
	cout << endl;
}

int main(){
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tc;
	tc = 1;
	cin >> tc;
	for(int i=1;i<=tc;i++){
		solve();
	}
	return 0;
}
