#include <bits/stdc++.h>

using namespace std;

int low(int k) {
    return k*(k+1)/2;
}

int high(int i, int k) {
    return (2*i - k + 1) * k / 2;
}

void solve() {

    int n,l,r,s;

    cin >> n >> l >> r >> s;

    set<int> nums;
    for(int i = 1; i <= n; i++) {
        nums.insert(i);
    }

    vector<int> ans(n);

    int k = r-l+1;
    int cur = l-1;

    for(int i = n; i >= 1; i--) {
        if(k > 0 and high(i, k) >= s and low(k-1) <= s-i) {
            ans[cur] = i;
            nums.erase(i);
            k--;
            s -= i;
            cur++;
        }
    }

    if(s > 0) {
        cout << -1 << endl;
        return;
    }

    for(int i = 0; i < l-1; i++) {
        ans[i] = *(nums.begin());
        nums.erase(ans[i]);
    }

    for(int i = r; i < n; i++) {
        ans[i] = *(nums.begin());
        nums.erase(ans[i]);
    }

    for(int i = 0; i < n; i++) {
        cout << ans[i] << " ";
    }
    cout << endl;


}

int main() {

    int t;
    cin >> t;

    while(t--) {
        solve();
    }

}