/******************************************************************************

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, 
C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
typedef long long int ll;
int main()
{ ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  int t=1;cin>>t;while (t--){
      ll n;ll l,r;cin>>n>>l>>r;
      ll pre[n]={0};pre[0]=2*(n-1);
      for (int i=1;i<n-1;i++){
          pre[i]=pre[i-1]+2*(n-i-1);
      }
      pre[n-1]=pre[n-2]+1;
      int in=lower_bound(pre,pre+n,l)-pre,in2=lower_bound(pre,pre+n,r)-pre;
      if (in==n-1){
          cout<<1<<"\n";
      }
      else{
          
          ll temp=l;
          if (in){
              temp-=pre[in-1];
          }
          ll st=(temp+1)/2+in+1,st1,st2;
          if (temp%2){st1=in+1,st2=st;}else {st1=st;st2=in+1;}
          
          if (in==in2){
              for (ll k=l;k<r;k+=2){
                  cout<<st1<<" "<<st2<<" ";
                  if (st1==in+1)st2++;
                  else st1++;
              }
              if ((r-l)%2==0){
                  cout<<st1;
              }
              cout<<"\n";
          }
          else{
              for (ll k=l;k<pre[in];k+=2){
                  cout<<st1<<" "<<st2<<" ";
                  if (st1==in+1)st2++;
                  else st1++;
              }
              if ((pre[in]-l)%2==0)
              cout<<st1<<" ";
              for (int k=in+1;k<in2;k++){
                  for (int j=k+2;j<=n;j++){
                      cout<<k+1<<" "<<j<<" ";
                  }
              }
              if (in2==n-1)cout<<1<<"\n"; else{
              ll t2=r-pre[in2-1];
              for (ll i=1;i<t2;i+=2){
                  cout<<in2+1<<" "<<in2+1+i<<" ";
              }
              if (t2%2)cout<<in2+1;cout<<"\n";}
          }
          
      }
      
      
      
      
  }
    return 0;
}
