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

typedef long long ll;

const int maxn = 1e3+10;
int n,a[maxn],l,r,s,ans[maxn];
bool vis[maxn];

int main(){
    int T;
    cin>>T;
    while(T--){
        scanf("%d%d%d%d",&n,&l,&r,&s);
        for (int i=1;i<=n;i++) vis[i] = 0,ans[i] = 0;

        int sum = 0;
        for (int i=1;i<=r-l+1;i++){
            a[i] = i;
            sum += a[i];
        }
        if(sum > s){
            puts("-1");continue;
        }
        int d = s-sum,cnt = 0;
        while(d>=r-l+1){
            d-=(r-l+1);
            cnt++;
        }
        for (int i=1;i<=r-l+1;i++){
            a[i]+=cnt;
            // cout<<"a = "<<a[i]<<endl;
        }
        // cout<<"d = "<<d<<endl;
        int flag = 1;
        for (int i=r-l+1;i>=r-l+1-d+1;i--){
            a[i]++;
        }
        if(a[r-l+1]>n) {
            flag = 0;
        }
        if(!flag){
            puts("-1");continue;
        }
        for (int i=1;i<=r-l+1;i++){
            // cout<<"aaa = "<<a[i]<<endl;
            vis[a[i]] = 1;
        }
        int now = l;
        for (int i=1;i<=r-l+1;i++){
            // cout<<"now = "<<now<<endl;
            ans[now] = a[i];
            now++;
        }
        now = 1;
        for (int i=1;i<=n;i++){
            if(ans[i]) continue;
            while(vis[now]) now++;
            ans[i] = now;
            vis[now] = 1;
        }
        for (int i=1;i<=n;i++){
            printf("%d%c",ans[i],i==n?'\n':' ');
        }
    }
    return 0;
}