#include<bits/stdc++.h>
using namespace std;
void solve(){
int n,l,r,s;
	cin>>n>>l>>r>>s;
	int a[n+7];
	int p=0,c=1,t=l;
	while (c<r-l+2){
		if (p+c>s) break;
		a[t]=c;
		t++;
		p+=c;
		c++;
	}
	int temp=s-p;
	c--;
	if (c<r-l) {
		cout<<-1<<endl;
		return;
	}
	int cc=r;
	if (c==r-l+1&&temp>0)
		while (temp>0){
			a[cc]++;
			if (a[cc]>n) {
				cout<<-1<<endl;
				return;
			}
			cc--;
			if (cc==l-1) cc=r;
			temp--;
		}
	else if (c==r-l) {
		if (temp<=c) {
			cout<<-1<<endl;
			return ;
		}
	}
	int check[n+7];
	for (int i=1;i<=n;i++) check[i]=0;
	for (int i=l;i<=r;i++){
		check[a[i]]=1;
	}
	t=1;
	for (int i=1;i<=n;i++){
		if (t==l) t=r+1;
		if (check[i]==0) a[t]=i,t++;
		
	}
//	for (int i=l;i<=r;i++) cout<<a[i]<<" ";
//	cout<<endl;
	for (int i=1;i<=n;i++) cout<<a[i]<<" ";
	cout<<endl;	
}
int main(){
	int test;
	cin>>test;
	while (test--){
		solve();
	}
}