#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back
#define fi first
#define se second
#define in insert
#define mp make_pair
#define mt make_tuple
#define all(v) v.begin(),v.end()
#define loop(i,n) for (int i=0;i<n;i++)
#define Loop(i,n) for (int i=1;i<=n;i++)

vector<int> graph[200005];
int vis[200005]={0};

const int inf=1e18;
const int mod=998244353;

bool sortbysec(const pair<int,int> &a, const pair<int,int> &b){
    return (a.second < b.second);
}

bool checkPalindrome(string str) {
    int t, l, i, j, p;
    string a, b;
    l = str.length();
    a = str.substr(0, l / 2);
    if (l % 2 == 0) {
        b = str.substr(l / 2, l / 2);
        reverse(b.begin(), b.end());
        if (a == b)
            return true;
        return false;
    } else {
        b = str.substr(l / 2 + 1, l / 2);
        reverse(b.begin(), b.end());
        if (a == b)
            return true;
        return false;
    }
}

void dfs(int node) {
    vis[node] = 1;
    for (auto u:graph[node]) {
        if (!vis[u])
            dfs(u);
    }
}


signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL), cout.tie(NULL);
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    int t, i, p, r, l, len, mini, maxi, n, s, diff, j;
    cin >> t;
    while (t--) {
        cin >> n >> l >> r >> s;
        len = r - l + 1;
        mini = (len * (len + 1)) / 2;
        p = n - len;
        maxi = ((n * (n + 1)) - (p * (p + 1))) / 2;
        if (s >= mini && s <= maxi) {
            int arr[n + 1];
            loop(i, n + 1)  arr[i] = 0;
            int res[len + 1];
            for (i = 1; i <= len; i++) {
                res[i] = n - len + i;
                arr[n - len + i] = 1;
            }
            diff = maxi - s;

            for (i = len; i >= 1; i--) {
                for (j = 1; j <= n-len; j++) {
                    p = res[i] - j;
                    if (p <= diff && arr[j] == 0) {
                        arr[res[i]]=0;
                        diff -= (res[i] - j);
                        res[i] = j;
                        arr[j] = 1;
                        break;
                    }
                }
                if (diff == 0)
                    break;
            }
            vector<int> v;
            Loop(i,n){
                if(arr[i]==0)
                    v.pb(i);
            }

            for (i=0;i<l-1;i++)
                cout<<v[i]<<" ";
            for (i = 1; i <= len; i++)
                cout << res[i] << " ";
            for (i=l-1;i<v.size();i++)
                cout<<v[i]<<" ";
            cout << endl;

        } else
            cout << -1 << endl;
    }
}
