#include <bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tag_and_trait.hpp>
#define fastio cin.tie(0); ios::sync_with_stdio(0);
#define multitc int _t; cin>>_t; while(_t--)
#define arrin(arr, n, type) arr.assign(n,type()); for(auto& i : arr) cin>>i;
#define all(x) (x).begin(), (x).end()
const int dir[9][2] = {{-1,0},{0,1},{1,0},{0,-1},{1,1},{-1,-1},{1,-1},{-1,1},{0,0}};
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const ll INF = 1e9+7;
const ll MOD = 998244353;
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update> ordered_set;
int nextInt(){int x; cin>>x; return x;}
ll nextLong(){ll x; cin>>x; return x;}
template<typename T>
void arrin2d(vector<vector<T>>& arr, int y, int x)
{
    arr.assign(y,vector<T>(x));
    for(int i=0;i<y;++i)
    {
        for(int j=0;j<x;++j)
        {
            cin>>arr[i][j];
        }
    }
}
 
//using template
//code goes here
 
ll n, l, r;
void print_segment(int num, int start, int end)
{
    int len = (num-1)*2;
    for(int i=start;i<=end;++i)
    {
        if(i % 2 == 1)
        {
            cout<<num<<' ';
        }
        else
        {
            cout<<i/2+1<<' ';
        }
    }
}

int main()
{
    fastio;
    multitc
    {
        cin>>n>>l>>r;
        int nroot = 2;
        pair<int,int> left = {-1,-1}, right;
        for(int i=1;i<=n+1;++i)
        {
            if(i * 2 >= l && left.first == -1)
            {
                left = {nroot,(l-1) % (i*2)};
            }
            if(i * 2 >= r)
            {
                right = {nroot,(r-1)%(i*2)};
                break;
            }
            l-=i*2;
            r-=i*2;
            ++nroot;
        }
        if(left.first == right.first)
        {
            print_segment(left.first,left.second,right.second);
        }
        else
        {
            print_segment(left.first,left.second,(left.first-1)*2-1);
            for(int i=left.first+1;i<right.first;++i)
            {
                print_segment(i,0,(i-1)*2-1);
            }
            print_segment(right.first,0,right.second);
        }
        
        cout<<'\n';
    }
}