#include<bits/stdc++.h>
#define ll long long int
#define f0n for(ll i=0; i<n; i++)
using namespace std;

int main(){
      ll t;
      cin>>t;
      while(t--)
      {
        ll n,l,r,s,mx,mn,k;
        cin>>n>>l>>r>>s;
        k=r-l+1;
        mx=(k*(2*n -k +1))/2;
        mn=(k*(k+1))/2;
        set<ll>s2;
	    set<ll>s1;
        if(s>mx || s<mn) cout<<"-1"<<endl;
        else
        {
        //	cout<<"runs1"<<endl;
        	for(ll i=n; i>=1; i--)
        	{    
        //	cout<<"runs2"<<endl;
            	mn=(k*(k-1))/2;
            //	cout<<"mn= "<<mn<<endl;
           // 	cout<<"i,mn= "<<i<<" "<<mn<<endl;
        	    if(s-i >=mn)
        	    { 
        	    	s2.insert(i);
        	    	k--;
        	    	s=s-i;
				}
				else s1.insert(i);
			//	cout<<"k,s= "<<k<<" "<<s<<endl;
				
			}
			for(ll i=1; i<=n; i++)
			{//cout<<"runs3"<<endl;
				if(i>=l && i<=r)
				{ //cout<<"runs4"<<endl;
					cout<<*s2.begin()<<" ";
					s2.erase(s2.begin());
				}
				else
				{ //cout<<"runs5"<<endl;
					cout<<*s1.begin()<<" ";
					s1.erase(s1.begin());
				}
			}
			cout<<endl;
		}
	}
	  return 0;
}
/*
5
5 2 3 5
5 3 4 1
3 1 2 4
2 2 2 2
2 1 1 3

*/
/*
1 2 3 4 5 
-1
1 3 2 
1 2 
-1
*/
