#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define ordered_pair_set tree<pair<int,int>, null_type,less<pair<int,int>>, rb_tree_tag,tree_order_statisticur_node_update> 
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#define fi first
#define se second
#define endl '\n'
#define int int64_t
#define double long double
mt19937 rnd(time(0));
// const double TIME_LIMIT = 1.8;
// Heuristic TL: clock() < TIME_LIMIT * CLOCKS_PER_SEC
const int MAXN = 101;
const int MOD = (int)1e9 + 7;

signed main(){
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); 
	// freopen("FDT.txt","r",stdin);
	int test;
	cin >> test;
	while(test --){
		int n, l, r;
		cin >> n >> l >> r;
		int cur = 0;
		int st = 0;
		for(int brac = 1; brac < n; brac ++){
			int range = 2*(n - brac);
			if(l >= cur + 1 && l <= cur + range){
				st = brac;
				break;
			}
			cur += range;
		}
		if(st == 0){
			cout << 1 << endl;
			continue;
		}
		// cout << st << " " << cur << endl;
		vector<int> res;
		int c = cur + 1;
		int inb = 0;
		int mt = st + 1;
		while(c <= n*(n - 1) && c <= r){
			int current;

			if(!inb){
				if(c >= l && c <= r) res.push_back(st);
			}
			else{
				if(c >= l && c <= r) res.push_back(mt);
				mt ++;
			}
			c ++;
			if(c == cur + (n - st)*2 + 1){
				// new brac
				st ++;
				mt = st + 1;
			}
			inb ^= 1;
		}
		if(r == (n*(n - 1) + 1))
			res.push_back(1);
		for(auto u: res)
			cout << u << " ";
		cout << endl;
	}
}