#include<bits/stdc++.h>
#define pr(x) cerr << "\n" << (#x) << " is " << (x) << endl
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define ull unsigned long long
#define Toggle(n,i) (n^(1<<i))
#define Check(n,i) (n&(1<<i))
#define Set(n,i) (n|(1<<i))
#define Reset(n,i) (n&(~(1<<i)))
#define fo(x,y) for(int i=(x);i<=(y);++i){cout<<i<<endl;}
#define me(arr,val) memset(arr,val,sizeof arr)
#define inf 10e8
#define infl LLONG_MAX
#define mod 1000000007
#define f first
#define s second
#define  g(t,a)  (get<a>(t))
#define pra(a) for(auto i:a){cout<<i<<endl;}
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
//int dx[]={+1,-1,0,0};//vertical horizontal
//int dy[]={0,0,+1,-1};//vertical horizontal
//int dx[]={+1,+1,-1,-1,+2,-2,+2,-2};//knights move
//int dy[]={+2,-2,+2,-2,+1,+1,-1,-1};//knights move
//int dx[]={+1,-1,0,0,+1,+1,-1,-1};//vertical horizontal diagonal
//int dy[]={0,0,+1,-1,-1,+1,+1,-1};//vertical horizontal diagonal
using namespace std;
using namespace __gnu_pbds;
/*typedef tree<int, null_type,less<int>, rb_tree_tag,
             tree_order_statistics_node_update>indexed_set;
for set use above*/
typedef tree<pair<int,int>, null_type,less_equal<pair<int, int>>, rb_tree_tag,
tree_order_statistics_node_update> indexed_multiset;

 ll a[100005],ans[100005];
int main()
{
    for(ll i=100000-1,j=2;i;--i,j+=2)
    {
        a[i]=j;
    }
    for(ll i=1;i<=100000-1;++i)
    {
        a[i]+=a[i-1];
    }
    int t;
    scanf("%d",&t);
    while(t--)
    {
        ll n,l,r,l2,first,sec,k=0;
        scanf("%lld%lld%lld",&n,&l,&r);
        if(l==r)
        {
            printf("1\n");
            continue;
        }
        l2=l;
        ll ind=lower_bound(a+1,a+n+1,l)-a;
        if(l%2==0)
        {
            l=l-1;
        }
        first=ind;
        sec=(l-a[ind-1]+1)/2+ind;
        for(ll i=first;i<n;++i,sec=i+1)
        {
            for(ll j=sec;j<=n;++j)
            {
                ans[++k]=i;
                ans[++k]=j;
                if(k>=r-l+1)
                {
                    break;
                }
            }
        }
        if(r-l+1==n*(n-1)+1)
        {
            ans[r-l+1]=1;
        }
        ll i=1;
        if(l2%2==0)
        {
            i=2;
        }
        for(;i<=r-l+1;++i)
        {
            printf("%lld ",ans[i]);
        }
        printf("\n");
    }
    return 0;
}

