#include<bits/stdc++.h>
#define MOD 1000000007
#define endl "\n"
#define deb(x) cout<<#x<<" = "<<x<<endl;
#define debb(x,y) cout<<#x<<" = "<<x<<" , "<<#y<<" = "<<y<<endl;
#define all(v) (v.begin()),(v.end())
using namespace std;
typedef long long int ll;



void solve(){
    ll n,l,r,s;
    cin>>n>>l>>r>>s;
    ll rg=r-l+1;
    ll mn=0;
    ll mx=0;
    vector<ll>v;
    for(ll i=1;i<=rg;i++){
        v.push_back(i);
        mn+=i;
    }
    for(ll i=n;i>(n-rg);i--){
        mx+=i;
    }
    
    if(s>mx || s<mn){
        cout<<-1<<endl;
        return;
    }
    ll a=n;
    ll sum=mn;
    for(ll i=v.size()-1;i>=0;i--){
        if(sum==s){
            break;
        }
        ll x=s-sum;
        sum=sum-v[i];
        v[i]=min(v[i]+x,a);
        a--;
        sum+=v[i];
        if(sum==s){
            break;
        }
        
    }
    int b[n];
    int j=0;
    set<int>st;
    for(int i=1;i<=n;i++){
        st.insert(i);
    }
    memset(b,-1,sizeof(b));
    for(int i=l-1;i<r;i++){
        b[i]=v[j];
        st.erase(v[j]);
        j++;
    }
    for(int i=0;i<n;i++){
        if(b[i]==-1){
            b[i]=*st.begin();
            st.erase(b[i]);
        }
    }
    for(int i=0;i<n;i++){
        cout<<b[i]<<" ";
    }cout<<endl;
    

    return;
}




int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll TC=1;
    cin>>TC;
while(TC--){
    solve();
}
return 0;
}




