#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define mp make_pair
#define pb push_back
#define pf push_front
#define F first
#define S second
#define MOD 1000000007
#define MAXN   1000001
#define MODA 998244353
#define all(a)      (a).begin(),(a).end()
#define allr(a)      (a).rbegin(),(a).rend()

ll power(ll a,ll b){
    ll result=1;
    while(b>0){
        int lastbit=(b&1);
        if(lastbit){
            result=(result*a);
        }
        a=(a*a);
        b=b>>1;
    }
    return result;
}

ll power2(ll a,ll b,ll p){
    ll result=1;
    while(b>0){
        int lastbit=(b&1);
        if(lastbit){
            result=(result*a)%p;
        }
        a=(a*a)%p;
        b=b>>1;
    }
    return result%p;
}

ll gcd(ll a, ll b){
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

vector<ll> Sieve(int n){
    bool prime[n+1];
    memset(prime, true, sizeof(prime));
    for (int p=2; p*p<=n; p++){
        if (prime[p] == true){
            for (int i=p*p; i<=n; i += p)
                prime[i] = false;
        }
    }
    vector<ll>v;
    for (int p=2; p<=n; p++)
        if (prime[p]) v.pb(p);
    return v;
}

vector<ll> SeiveOfEratosthenes(int n){
    vector<ll>v(n+1,0);
    for(int i=0;i<=n;i++){
        v[i]=i;
    }

    for (int p=2; (p*p)<=n; p++){
        if (v[p] == p){
            v[p]=p;
            for (int i=p*p; i<=n; i += p) {
                v[i] = p;
            }
        }
    }
    return v;
}

vector<ll> SmallestPrimeFactors(int n){
    vector<ll>spf(n+1,0);
    spf[1] = 1;
    for (int i=2; i<=n; i++){
        spf[i] = i;
    }
    for (int i=4; i<=n; i+=2){
        spf[i] = 2;
    }
    for (int i=3; (i*i)<=n; i++){
        if (spf[i] == i){
            for (int j=i*i; j<MAXN; j+=i) {
                if (spf[j] == j){
                    spf[j] = i;
                }
            }
        }
    }
    return spf;
}

void shortest(map<int,vector<pair<int,ll>>>m,int src,int n,ll *dist){
    bool visited[n+1];
    set<pair<ll,int>>s;
    for(int i=0;i<=n;i++){
        dist[i]=-1;
        visited[i]=false;
    }

    s.insert(mp(0ll,src));
    dist[src]=0;
    while(!s.empty()){
        auto t=s.begin();
        ll dis=(*t).F;
        int u=(*t).S;
        s.erase(t);
        if(visited[u]){
            continue;
        }
        visited[u]=true;
        for(auto tt:m[u]){
            int v=tt.F;
            ll w=tt.S;
            if(!visited[v]){
                if(dist[v]!=-1 && dist[v]>dis+w){
                    s.erase(mp(dist[v],v));
                    dist[v]=dis+w;
                    s.insert(mp(dist[v],v));
                }else if(dist[v]==-1){
                    dist[v]=dis+w;
                    s.insert(mp(dist[v],v));
                }
            }
        }
    }
}

int main(){

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int tttttt=1;
    cin >> tttttt;
    for(int ttttt=1; ttttt <= tttttt; ttttt++){
        ll n,l,r,s;
        cin>>n>>l>>r>>s;
        ll len=(r-l+1);
        vector<int>v;
        for(int i=0;i<len;i++){
            v.pb(i+1);
            s-=(i+1);
        }
        if(s<0){
            cout<<-1;
        }else{
            ll t=n-len;
            int x=0;

            for(int i=1;i<=t;i++){
                if(s>=len){
                    s-=len;
                    x++;
                }else{
                    for(int j=v.size()-1;j>=0 && s>0 ;j--){
                        v[j]+=1;
                        s--;
                    }
                    break;
                }
                if(s==0){
                    break;
                }
            }

            for(int j=0;j<v.size();j++){
                v[j]+=x;
            }

            if(s!=0){
                cout<<-1;
            }else{

                int a[n];
                int j=0;
                int st[n+1];

                for(int i=1;i<=n;i++){
                    st[i]=0;
                }
                for(int i=l-1;i<r;i++){
                    a[i]=v[j];
                    st[v[j]]=-1;
                    j++;
                }

                j=1;
                for(int i=0;i<(l-1);){
                    if(st[j]==0){
                        a[i]=j;
                        j++;
                        i++;
                    }else{
                        j++;
                    }
                }
                for(int i=r;i<(n);){
                    if(st[j]==0){
                        a[i]=j;
                        j++;
                        i++;
                    }else{
                        j++;
                    }
                }
                for(int i=0;i<n;i++){
                    cout<<a[i]<<" ";
                }
            }
        }
        cout<<endl;
    }

    return 0;
}