#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fastIO ios_base::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define pl pair<ll, ll>
#define vl vector<ll>
#define mp make_pair
#define mod 1000000007
#define N 100001
 


int main()
{
    fastIO
    ll t;cin>>t;
    while(t--)
    {
        ll n,l,r,s;cin>>n>>l>>r>>s;
        ll ans[n+1];
        ll len=r-l+1;
        ll q=s/len;
        ll rem=s%len;
        set<ll>se;
        for(ll i=1;i<=n;i++)
        {
            se.insert(i);
        }
        for(ll i=l;i<=r;i++)
        ans[i]=q;
        for(ll i=l;i<l+rem;i++)
        ans[i]+=1;
        ll cnt=1,p=0;
        if(len%2==0)
        {
            for(ll i=l;i<l+len/2;i++)
            {
                ans[i]-=cnt;
                cnt+=1;
            }
            cnt--;
            for(ll i=l+len/2;i<=r;i++)
            {
                ans[i]+=cnt;
                cnt-=1;
            }
        }
        else
        {
            cnt=len/2;
            for(ll i=l;i<l+len/2;i++)
            {
                ans[i]+=cnt;
                cnt-=1;
            }
            cnt=1;
            for(ll i=l+len/2+1;i<=r;i++)
            {
                // cout<<ans[i]<<" ";
                ans[i]-=cnt;
                cnt+=1;
            }
        }
        ll sum=0;
        for(ll i=l;i<=r;i++)
        {
            sum+=ans[i];
        }
        if(sum!=s)
        ans[r]+=(s-sum);
        for(ll i=l;i<=r;i++)
        {
            if(ans[i]>n || ans[i]<1)
            {
                p=1;
                break;
            }
            else
            se.erase(ans[i]);
        }
        if(p)
        cout<<"-1"<<"\n";
        else
        {   
            for(ll i=1;i<l;i++)
            {
                ll x=*se.begin();
                se.erase(x);
                ans[i]=x;
            }
            for(ll i=r+1;i<=n;i++)
            {
                ll x=*se.begin();
                se.erase(x);
                ans[i]=x;
            }
            for(ll i=1;i<=n;i++)
            cout<<ans[i]<<" ";
            cout<<"\n";
        }
    }
}   