#include<bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#define FASTER ios_base::sync_with_stdio(0);cin.tie(0)
#define trace(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); tracer(_it, args); cout << endl; }
void tracer(istream_iterator<string> it) {}
template<typename T, typename... Args>
void tracer(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << " | ";
    tracer(++it, args...);
}
#define setPrecision(n) cout << std::setprecision(n) << std::fixed;
#define rep(i,j,n) for(int i = j; i < n; i++)
#define ll long long
#define ld long double
#define pb push_back
#define ppb pop_back
#define sz(x) ((int) (x).size())
#define all(c) (c).begin(),(c).end()
#define F first
#define S second
#define INF 2e9
#define LINF 2e18
// #define int ll
const long long MOD = 1e9 + 7;
const double err = 1e-10;
const int N = 2e5 + 5;

void solve() {
    int n, l, r, s, cnt;
    cin >> n >> l >> r >> s;
    cnt = (r - l + 1);
    int mn = ((cnt) * (cnt + 1)) / 2;
    if (mn > s) {
        cout << "-1\n";
        return;
    }
    vector<int> ans(cnt);
    iota(all(ans), 1);
    vector<bool> used(n + 1, 0);
    rep(i, 1, cnt + 1) {
        used[i] = 1;
    }
    int mx = n;
    for (int i = cnt - 1; i >= 0; i--) {
        if (mn + (mx - ans[i]) <= s) {
            mn += (mx - ans[i]);
            used[ans[i]] = 0;
            ans[i] = mx;
            used[ans[i]] = 1;
            mx--;
        }
        else {
            used[ans[i]] = 0;
            ans[i] = ans[i] + (s - mn);
            used[ans[i]] = 1;
            mn += (s - mn);
            break;
        }
    }
    if (mn != s) {
        cout << "-1\n";
        return;
    }
    int pos = 1;
    rep(i, 1, l) {
        while (used[pos]) {
            pos++;
        }
        cout << pos << " ";
        pos++;
    }
    rep(i, l, r + 1) {
        cout << ans[i - l] << " ";
    }
    rep(i, r + 1, n + 1) {
        while (used[pos]) {
            pos++;
        }
        cout << pos << " ";
        pos++;
    }
    cout << "\n";
}

int32_t main() {
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    FASTER;
    int T = 1;
    cin >> T;
    for (int i = 1; i <= T; i++) {
        // cout << "Case #" << i << ": ";
        solve();
    }
    return 0;
}