#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

using namespace std;
 
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define trav(a, x) for (auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int) (x).size()
typedef long long ll;
typedef pair<ll, ll> pii;
typedef tuple<ll, ll, ll> ll3;
typedef vector<int> vi;
typedef vector<pii> vpi;
 
int t, n, l, r, s;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	cin >> t;
	while (t--) {
		cin >> n >> l >> r >> s;

		int diff = r - l + 1;

		set<int> unused, res;
		rep(i, 1, n+1) unused.insert(i);

		for (int i = n; diff > 0 && i > 0; i--) {
			if (i <= s && s - i >= (diff * (diff - 1) / 2)) {
				diff--;
				s -= i;
				res.insert(i);
				unused.erase(i);
			}
		}

		if (s != 0) {
			cout << -1 << '\n';
			continue;
		}

		rep(i, 1, l) {
			cout << *unused.begin() << " ";
			unused.erase(*unused.begin());
		}

		trav(cur, res) cout << cur << " ";
		trav(cur, unused) cout << cur << " ";
		cout << '\n';
	}
 
	return 0;
}

