import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        int t=Integer.parseInt(br.readLine());
        for(int x=0;x<t;x++)
        {
            String str[]=br.readLine().split(" ");
            int n=Integer.parseInt(str[0]);
            long l=Long.parseLong(str[1]);
            long r=Long.parseLong(str[2]);
            long num=1;
            long sum=0;
            while(sum+num*2<=l)
            {
                sum+=num*2;
                num++;
            }
            //num--;
            l-=sum;
            r-=sum;
            int arr[]=new int[200000];
            int ind=0;
            arr[0]=1;
            l--;
            r--;
            //System.out.println(l+" "+r);
            for(int i=(int)num+1;i<=n&&ind<=r;i++)
            {
                for(int j=2;j<=i&&ind<=r;j++)
                {
                    arr[++ind]=i;
                    if(j==i)
                    arr[++ind]=1;
                    else
                    arr[++ind]=j;
                }
            }
            /*for(int i=0;i<arr.length;i++)
            pw.print(arr[i]+" ");*/
            for(int i=(int)l;i<=(int)r;i++)
            pw.print(arr[i]+" ");
            pw.println();
        }
        pw.flush();
        pw.close();
    }
}