#include <bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(0);
    long long int test;
    cin >> test;
    abar:
    while(test--)
    {
        long long int element,l,r,s,n,i,mini,maxi;
    cin >> n >> l >> r >> s;
    element=r-l+1;
    vector<long long int>v;
    mini=(element*(element+1))/2;
    maxi=(n*(n+1))/2-((n-element)*(n-element+1))/2;
    if(s<mini || s>maxi)
    {
        cout << "-1" << endl;
        goto abar;
    }
    for(i=1;i<=element;i++) v.push_back(i);
    maxi=n;
    reverse(v.begin(),v.end());
    for(i=0;i<v.size();i++)
    {
        if(mini==s) break;
        long long int dorkar=min((s-mini),(maxi-v[i]));
        v[i]+=dorkar;
        mini+=dorkar;
        maxi--;
    }
    queue<long long int>q;
    element=0;
    for(i=n;i>=1;i--)
    {
        if(i==v[element]) element++;
        else q.push(i);
    }
    element=0;
    for(i=1;i<=n;i++)
    {
        if(i>=l && i<=r)
        {
            cout << v[element] << " ";
            element++;
        }
        else
        {
            cout << q.front() << " ";
            q.pop();
        }
    }
    cout << endl;
    }
}
