/* Author: Rennan Rocha
 * Time: 2020-04-25 16:10:02
**/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define F first
#define S second
#define PB push_back
#define MP make_pair

#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define pi pair<int,int>
#define pll pair<ll, ll>
#define vpi vector<pi>
#define vpll vector<pll>

#define INF 1e18
#define MOD 1e9 + 7

using namespace std;
using namespace __gnu_pbds;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
//*find_by_order(); order_of_key();

int main() {
    ios_base::sync_with_stdio(false);

    vll v;
    v.PB(1);
    ll sum = 1;
    for(ll i = 2; sum <= 9999900002; i+=2) {
        sum += i;
        v.PB(i);
    }

    int t;
    cin >> t;
    while(t--) {
        ll n, l, r;
        cin >> n >> l >> r;

        ll sum = 0;
        ll ini = 0;
        for(int i = 0; i < v.size(); i++) {
            sum += v[i];
            if(sum >= l) {
                ini = v[i];
                break;
            }
        }
        ll extra = sum - l - 1;
        if(extra < 0) extra += ini;

        vll vec;
        ll cara = (ini)/2LL+1;
        ll at = extra;

        int cnt = 0;
        while(cnt < r-l+1) {
            if(at % 2 == 0) {
                cout << cara << " ";
                at++;
                if(cara == 1) {
                    cara++;
                    at = 0;
                }
            }else {
                ll c = at/2LL + 2LL;
                at++;
                if(c == cara) {
                    c = 1;
                    cara++;
                    at = 0;
                }
                cout << c << " ";
            }
            cnt++;
        }
        cout << "\n";
    }
}
