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

#define ll long long
const int maxn = 5e2 + 10;

int ans[maxn];
int cnt[maxn];

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, l, r, s;
        cin >> n >> l >> r >> s;
        int tmp = n;
        int minv = (1 + (r - l + 1)) * (r - l + 1) / 2;
        int maxv = (n + n - r + l) * (r - l + 1) / 2;
        memset(ans, 0, sizeof ans);
        memset(cnt, 0, sizeof cnt);


        if (minv <= s && s <= maxv) {

            for (int i = l,b=1; i <= r; i++,b++)
                ans[i] = b,cnt[b]=1;
            int total = ( 2+r - l) * (r - l + 1) / 2;
            total=s-total;   
            
            for (int i = r; i >=l; i--) {
                if(!total) {
                    break;
                }
                if(n-ans[i]<=total){
                    total-=n-ans[i];
                    cnt[ans[i]]=0;
                    cnt[n]=1;
                    ans[i]=n;
                    
                }
                else{
                    cnt[ans[i]]=0;
                    cnt[ans[i]+total]=1;
                    ans[i]=ans[i]+total;
                    total=0;
                }
                n--;
            }
            queue<int> q;
            for (int i = 1; i <= tmp; i++)
                if (!cnt[i])
                    q.push(i);
            for (int i = 1; i <= tmp; i++) {
                if (!ans[i]) {
                    cout << q.front() << " ";
                    q.pop();

                } else
                    cout << ans[i] << " ";
            }
            cout << endl;

        } else
            puts("-1");
    }
}