#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define sda '\n'
#define asd ' '
#define min(a,b) (a<b?a:b)
#define max(a,b) (a>b?a:b)
#define sz(x) (int)x.size()
#define mem(x) memset((x),0,sizeof((x)));
const int M = 1e6+5;
const ll LMAX = 0x7fffffffffffffff;
const int mod = 1e9+7;//998244353


void solve(){
    int n,l,r,s;
    cin >> n >> l >> r >> s;
    --l,--r;
    int gs = r - l + 1;
    vector<int>per(n,0);
    int mx = ((n - gs + 1 + n) * gs) / 2;
    int mi = ((1 + 1 + gs - 1) * gs) / 2;
    vector<int> dd;
    if(s > mx || s < mi){
         cout << -1 << sda;
         return ;
    }
    for(int i = n - gs + 1; i <= n; i++){
         dd.push_back(i);
    }
    int dif = mx - s;
    int j = 1;
    for(int i = 0; i < sz(dd); i++){
         if(dif == 0) break;
         if(dif - (dd[i] - j) >= 0) {
             dif -= (dd[i] - j);
             dd[i] = j;
             j ++;
         }
         else {
             dd[i] -= dif;
             dif = 0;
         }
    }
    int k = 0;
    vector<int>rec(n+1,0);
    for(int i = l; i <= r;i++){
         per[i] = dd[k++];
         rec[dd[k - 1]] = 1;
    }
    k = 0;
    for(int i = 1; i <= n; i++){
       if(rec[i] ) continue;
       if(k == l){
            k = r + 1;
       }
        per[k++] = i;
    }
    for(auto it : per) cout << it << asd;
    cout << sda;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    int T = 1;
    cin >> T;
    for(int i = 1; i <= T; i++){
         solve();
    }
    return 0;
}
