#include<iostream>
#include<queue>
#include<algorithm>
#include<vector>
#include<math.h>
#include<cstring>
#include<string>
#include<stack>
#include<map>
#include<set>
#include<cstdio>
#include<deque>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9 * 2;
const ll LNF = 1e18;
const ll MOD = 998244353;
const int MAXN = 200'005;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	int T;
	cin >> T;
	while (T--) {
		ll n, l, r;
		cin >> n >> l >> r;
		ll cou = r - l;
		ll s = 1;
		ll f = 0;
		while (1) {
			if (s + f > l) {
				break;
			}
			else
				s += f;
			f+=2;
		}
		//cout << "f " << f << '\n';
		f /= 2;
		//cout << "s , f : " << s << ' ' << f << "\n";
		ll a = f+1;
		ll b = (l - s+1)/2 ;
		//cout <<"a , b : "<< a << ' ' << b << "\n";
		for (ll i = l; i <=r; i++) {
			if (i == 1) {
				cout << 1 << ' ';
				a = 2;
				b = 0;
				continue;
			}
			if (i % 2 == 0) {
				cout << a << ' ';
				if (i != l)
					b++;
			}
			else {
				cout << b % (a - 1) + 1 << ' ';
				if (b == a - 1) {
					b = 0;
					a++;
				}
			}
		}
		cout << '\n';
		
	}
}