import java.io.*;
import java.util.*;
public class Main {
    public static void main(String args[])
    {
        FastReader input=new FastReader();
        PrintWriter out=new PrintWriter(System.out);
        int T=input.nextInt();
        while(T-->0)
        {
            long n=input.nextInt();
            long l=input.nextLong();
            long r=input.nextLong();
            if(l==n*(n-1)+1)
            {
                out.println(1);
            }
            else
            {
                if(l%2==0)
                {
                    l--;
                    long p=((l-1)/2)+1;
                    long s=0;
                    long index=0;
                    for(long i=1;i<=n;i++)
                    {
                        s+=(n-i);
                        if(p<=s)
                        {
                            index=i;
                            break;
                        }
                    }
                    long d=s-p;
                    long index1=n-d;
                    int c=0;
                    ArrayList<Long> list=new ArrayList<>();
                    while(true)
                    {
                        if(index==n*(n-1)+1)
                        {
                            list.add(1L);
                        }
                        else
                        {
                            list.add(index);
                        }
                        c++;
                        if(c==r-l+1)
                        {
                            break;
                        }
                        list.add(index1);
                        c++;
                        if(c==r-l+1)
                        {
                            break;
                        }
                        if(index1==n)
                        {
                            index++;
                            index1=index+1;
                        }
                        else
                        {
                            index1++;
                        }
                    }
                    for(int i=1;i<list.size();i++)
                    {
                        out.print(list.get(i)+" ");
                    }
                    out.println();
                }
                else
                {
                    long p=((l-1)/2)+1;
                    long s=0;
                    long index=0;
                    for(long i=1;i<=n;i++)
                    {
                        s+=(n-i);
                        if(p<=s)
                        {
                            index=i;
                            break;
                        }
                    }
                    long d=s-p;
                    long index1=n-d;
                    int c=0;
                    while(true)
                    {
                        if(r==n*(n-1)+1 && c==r-l)
                        {
                            out.print(1+" ");
                        }
                        else
                        {
                            out.print(index+" ");
                        }
                        c++;
                        if(c==r-l+1)
                        {
                            break;
                        }
                        out.print(index1+" ");
                        c++;
                        if(c==r-l+1)
                        {
                            break;
                        }
                        if(index1==n)
                        {
                            index++;
                            index1=index+1;
                        }
                        else
                        {
                            index1++;
                        }
                    }
                    out.println();
                }
            }
        }
        out.close();
    }
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {

            return Long.parseLong(next());
        }

        double nextDouble()
        {

            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}