#include <bits/stdc++.h>
#define ull unsigned long long 
#define ul unsigned long
#define ll long long
#define pb push_back
#define sodayoda_C  ios_base::sync_with_stdio(false);cin.tie(NULL);
#define f(i,a,b) for(int i = a;i<b;i++)
#define fb(i,a,b) for(int i = a;i>b;i--)
#define endl "\n"
#define yes cout<<"YES\n"
#define no cout<<"NO\n"
#define mp make_pair
//memset(name,'',size)
//reverse(s,begin(),s.end())
 
using namespace std;
 
int main(){	
	sodayoda_C;
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif
	int t;
	cin>>t;
	while(t--){
		int n, l, r, s;
		cin>>n>>l>>r>>s;
		int pos = 0;
		int num = r-l+1;
		if(s>=(num*(num+1))/2 && s<=((n*(n+1))/2 - ((n-num)*(n-num+1))/2)){
			int curr = ((n*(n+1))/2 - ((n-num)*(n-num+1))/2);
			int diff = curr-s;
			unordered_map<int, bool> mp;
			for(int i = n-num+1;i<=n;i++){
				if(diff>=i){
					int curr = i-1;
					while(!(mp.find(i-curr) == mp.end())){
						curr--;
					}
					mp[i-curr] = 1;
					diff-=curr;
				}else{
					int curr = max(0,diff);
					while(!(mp.find(i-curr) == mp.end())){
						curr--;
					}
					mp[i-curr] = 1;
					diff-=curr;
				}
			}
			int i = 1, p = 0;
			while(p<n){
				if(p == l-1){
					for(auto i: mp){
						cout<<i.first<<" ";
						p++;
					}
				}else{
    				if(mp.find(i) == mp.end()){
    					cout<<i<<" ";
    					p++;
    					i++;
    				}else{
    					i++;
    				}
				}
			}
			cout<<endl;
		}else{
			cout<<-1<<endl;
		}
	}
}