#include<bits/stdc++.h>

#define int long long int
#define all(x) x.begin() , x.end()
#define forn(i, n) for(int i=0;i<n;i++)
#define fork(k, n) for(int i=k;i<n;i++)
#define fast ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define endl "\n"
#define mod 1000000007

using namespace std;


void solve() {
    int n, l, r, s;
    cin >> n >> l >> r >> s;
    //cout << s << " :: ";
    int len = (r - l) + 1;
    int minn = (len * (len + 1)) / 2;
    int maxx = (len * (2 * n - len + 1)) / 2;
    if (s >= minn && s <= maxx) {
        int arr[len];
        forn(i, len) arr[i] = i + 1;
        s -= minn;
        int base = s / len;
        s -= len * base;
        forn(i, len) arr[i] += base;

        int i = len - 1;
        while (s != 0) {
            ++arr[i--];
            --s;
        }
        unordered_set<int> st;
        forn(j, n) st.insert(j + 1);
        for (int j: arr) st.erase(j);
        forn(j, l - 1) {
            cout << *st.begin() << " ";
            st.erase(*st.begin());
        }
        for (int j : arr) cout << j << " ";
        for (int j : st) cout << j << " ";
        cout << "\n";
    } else {
        cout << "-1\n";
    }
    return;
}


signed main() {
    fast;
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}