#include <bits/stdc++.h>
 
#define make_unique(x) sort(x.begin(),x.end()); (x).resize(unique(x.begin(),x.end()) - (x).begin())
#define forn(i, l, r) for(int i = int(l); i < int(r); i++)
typedef long long ll;
 
using namespace std;
 
int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  
  int t;
  cin >> t;
  while(t--) {
    ll n,l,r,s;
    cin >> n >> l >> r >> s;
    
    ll kol = r-l+1;
    if (s < kol*(kol+1)/2 || s > n*(n+1)/2 - (n-kol)*(n-kol+1)/2) {
      cout << -1 << endl;
      continue;
    }
    vector<int> otr;
    vector<int> nototr;

    for (int i = n; i >= 1;--i) {
      ll min_s = (kol-1)*kol/2 + i;
      ll max_s = i*(i+1)/2 - (i-kol)*(i-kol+1)/2;
      if (min_s <= s) {
        otr.push_back(i);
        s-=i;
        kol--;
      } else 
          nototr.push_back(i);
    }
    int num = 0;
    forn(i,1,n+1) {
      if (i < l || i > r) {
        cout << nototr[num] << " ";
        num++;
        continue;
      }
      if (i == l) {
        forn(j,0,otr.size())
          cout << otr[j] << " ";
        continue;
      }
    }
    cout << endl;
  }

}
