#include <bits/stdc++.h>
using namespace std;

#define fore(i, l, r) for (auto i = (l) - ((l) > (r)); i != (r) - ((l) > (r)); i += 1 - 2 * ((l) > (r)))
#define ceil(n, k) (((n) + ((k) - 1)) / (k))
#define all(a) begin(a), end(a)
#define sz(a) int(a.size())
#define eb emplace_back
#define pb push_back
#define f first
#define s second

#ifdef LOCAL
#include "../debug.h"
#else
#define debug(...)
#endif

using lli = long long;
using ld = long double;
using ii = pair<int, int>;
using vi = vector<int>;
using vii = vector<ii>;

const int N = 1e6 + 5;
int n, l, r, s;
int a[N], p[N];

void testCase() {
  cin >> n >> l >> r >> s;
  int k = r - l + 1;
  int sum = k * (k + 1) / 2;

  if (s < sum) {
    cout << -1 << '\n';
    return;
  }
  
  fore (i, 1, n + 1) {
    p[i] = i;
    a[i] = -1;
  }

  int mx = n;

  auto solve = [&] () {
    set<int> st;

    fore (j, 1, n + 1)
      st.insert(j);

    fore (j, 1, k + 1) {
      a[l + j - 1] = p[j];
      st.erase(p[j]);
    }

    fore (j, 1, n + 1) 
      if (a[j] == -1) {
        a[j] = *st.begin();
        st.erase(a[j]);
      }

    fore (j, 1, n + 1)
      cout << a[j] << " \n"[j == n];
  };

  fore (i, k + 1, 1) {
    if (sum == s) {
      solve();
      return;
    }

    while (p[i] < mx) {
      p[i]++;
      sum++;

      if (sum == s) {
        solve();
        return;
      }
    }

    mx--;
  }

  cout << -1 << '\n';
}

int main() { 
  cin.tie(0)->sync_with_stdio(0), cout.tie(0);

  int tc; cin >> tc; while (tc--)
  testCase(); 

  return 0;
}
