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]);
            
            if(l<=(n-1)*2+1)
            {
                int arr[]=new int[(int)(r-l+1)];
                int ind;
                if(l%2==0)
                {
                    arr[0]=(int)(l/2)+1;
                    arr[1]=1;
                    ind=1;
                    for(int i=(int)(l/2)+2;i<=n-1&&ind<arr.length-1;i++)
                    {
                        if(ind<arr.length-1)
                        arr[++ind]=i;
                        if(ind<arr.length-1)
                        arr[++ind]=1;
                    }
                }
                else
                {
                    arr[0]=1;
                    ind=0;
                    for(int i=(int)((l+1)/2)+1;i<=n-1&&ind<arr.length-1;i++)
                    {
                        if(ind<arr.length-1)
                        arr[++ind]=i;
                        if(ind<arr.length-1)
                        arr[++ind]=1;
                    }
                }
                if(ind<arr.length-1)
                arr[++ind]=n;
                for(int i=2;i<n&&ind<arr.length;i++)
                {
                    for(int j=i+1;j<=n&&ind<arr.length-1;j++)
                    {
                        arr[++ind]=i;
                        if(ind<arr.length-1)
                        arr[++ind]=j;
                    }
                }
                if(ind<arr.length-1)
                arr[++ind]=1;
                for(int i=0;i<arr.length;i++)
                pw.print(arr[i]+" ");
                pw.println();
            }
            else if(l<=(n-1)*2+1+2*(n-2))
            {
                int arr[]=new int[(int)r-(n-1)*2+5];
                int ind=0;
                arr[0]=n;
                for(int i=2;i<n&&ind<arr.length;i++)
                {
                    for(int j=i+1;j<=n&&ind<arr.length-1;j++)
                    {
                        arr[++ind]=i;
                        if(ind<arr.length-1)
                        arr[++ind]=j;
                    }
                }
                for(int i=0;i<arr.length;i++)
                pw.print(arr[i]+" ");
                pw.println();
            }
            else
            {
                long sum=2*(n-1)+1;
                int num=n-2;
                int num2=2;
                while(sum+2*(num)<l&&num>0)
                {
                    sum=sum+2*(num);
                    num--;
                    num2++;
                }
                int ind=-1;
                
                int arr[]=new int[(int)(r-sum)+5];
               // while(sum<=r)
                //{
                    for(int i=num2;i<n&&ind<arr.length;i++)
                    {
                        for(int j=i+1;j<=n&&ind<arr.length-1;j++)
                        {
                            arr[++ind]=i;
                            if(ind<arr.length-1)
                            arr[++ind]=j;
                        }
                    }
                //}
                
                if(ind<arr.length-1)
                arr[++ind]=1;
                //for(int i=0;i<arr.length;i++)
                //pw.print(arr[i]+" ");
                for(int i=(int)(l-sum);i<=(int)(r-sum);i++)
                pw.print(arr[i]+" ");
                pw.println();
            }
        }
        pw.flush();
        pw.close();
    }
}