//Author Sumit Raj.
#include<bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back//_____standard_template____
#define bsdk ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); //___________program booster_________
#define pop pop_back
#define str string
#define endl "\n"
#define vec vector
#define m_p make_pair
#define mod 1000000007
#define modi 998244353
int i,j;
main()
{
    bsdk
    int t;
    cin>>t;
    while(t--)
    {
        int n,l,r,c1=0,c;
        cin>>n>>l>>r;
        int p=0,sm=0;
        vector<int>ans;
        if(r==(n*(n-1))+1)
            c1=1;
        for(i=n-1;i>=0;i--)
        {
            sm+=(2*i);
            p++;
            if(sm>l)
            {
               p--;
               sm-=(2*i);
               break;
            }
        }
        p++;
        int k=l-sm,cnt=0;
        int s=p+(k/2)+1;
        if(k%2==0)
        {
            if(k==0)
               ans.pb(n);
            else
               ans.pb(p+(k/2));
            cnt++;
            s=p+(k/2)+1;
        }
        c=0;
        for(i=p;i<n;i++)
        {
            for(j=s;j<=n;j++)
            {
                ans.pb(i);
                cnt++;
                if(cnt==r-l+1)
                {
                    c=1;
                    break;
                }
                ans.pb(j);
                cnt++;
                if(cnt==r-l+1)
                {
                    c=1;
                    break;
                }
            }
            s=i+2;
            if(c==1)
                break;
        }
        if(c1==1)
        {
            ans.pb(1);
            cnt++;
        }
        //cout<<cnt<<endl;
        for(i=0;i<ans.size();i++)
            cout<<ans[i]<<" ";
        cout<<endl;
    }
}
