import java.io.*;
import java.util.*;

public class MainClass
{
    public static void main(String[] args)throws IOException
    {
        Reader in = new Reader();
        int t = in.nextInt();
        StringBuilder stringBuilder = new StringBuilder();
        while (t-- > 0)
        {
            int n = in.nextInt();
            long l = in.nextLong();
            long r = in.nextLong();
            long l1 = l;
            long r1 = r;
            boolean ff = false;
            long tot = 1L * n * (n - 1) + 1;
            if (tot == r)
            {
                r--;
                ff = true;
            }
            if (r < l)
            {
                if (ff)
                    stringBuilder.append("1\n");
                continue;
            }
            long[] sum = new long[n + 1];
            for (int i=1;i<=n;i++)
                sum[i] = sum[i - 1] + (n - i) * 2;
            int sIdx = -1;
            int eIdx = -1;
            for (int i=1;i<=n;i++)
            {
                if (sum[i] >= l)
                {
                    sIdx = i;
                    break;
                }
            }
            for (int i=1;i<=n;i++)
            {
                if (r > sum[i - 1] && r <= sum[i])
                {
                    eIdx = i;
                    break;
                }
            }
            l -= sum[sIdx - 1];
            boolean flag = false;
            boolean flag1 = false;
            if (l % 2 == 0)
                l /= 2;
            else
            {
                flag = true;
                l += 1;
                l /= 2;
            }
            r -= sum[eIdx - 1];
            if (r % 2 == 0)
                r /= 2;
            else
            {
                flag1 = true;
                r --;
                r /= 2;
            }
            long start = sIdx + l;
            long end = eIdx + r;
            StringBuilder stringBuilder1 = new StringBuilder();
            if (sIdx < eIdx)
            {
                if (flag) stringBuilder1.append(sIdx).append(" ").append(start++).append(" ");
                else stringBuilder1.append(start++).append(" ");
                for (long i=start;i<=n;i++)
                    stringBuilder1.append(sIdx).append(" ").append(i).append(" ");
                for (long i=sIdx + 1;i<eIdx;i++)
                {
                    for (long j=i + 1;j<=n;j++)
                        stringBuilder1.append(i).append(" ").append(j).append(" ");
                }
                for (long i=eIdx + 1;i<=end;i++)
                    stringBuilder1.append(eIdx).append(" ").append(i).append(" ");
                if (flag1)
                    stringBuilder1.append(eIdx).append(" ");
                if (ff)
                    stringBuilder1.append("1 ");
            }
            else
            {
                l = l1;
                r = r1;
                long count = r - l + 1;
                if (count > 0)
                {
                    long ss1 = sIdx;
                    long ss2 = start;
                    if (!flag)
                    {
                        stringBuilder1.append(ss2++).append(" ");
                        count--;
                    }
                    for (long i=0;i<count;i++)
                    {
                        if (i % 2 == 0)
                            stringBuilder1.append(ss1).append(" ");
                        else
                            stringBuilder1.append(ss2++).append(" ");
                    }
                }
            }
            stringBuilder.append(stringBuilder1).append("\n");
        }
        System.out.println(stringBuilder);
    }
}
class MergeSortLong
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(long arr[], int l, int m, int r) {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[] = new long[n1];
        long R[] = new long[n2];

        /*Copy data to temp arrays*/
        for (int i = 0; i < n1; ++i)
            L[i] = arr[l + i];
        for (int j = 0; j < n2; ++j)
            R[j] = arr[m + 1 + j];


        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i] <= R[j]) {
                arr[k] = L[i];
                i++;
            } else {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1) {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2) {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(long arr[], int l, int r) {
        if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
}
class Reader
{
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader()
    {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException
    {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException
    {
        byte[] buf = new byte[64]; // line length
        int cnt = 0, c;
        while ((c = read()) != -1)
        {
            if (c == '\n')
                break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException
    {
        int ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do
        {
            ret = ret * 10 + c - '0';
        }  while ((c = read()) >= '0' && c <= '9');

        if (neg)
            return -ret;
        return ret;
    }

    public long nextLong() throws IOException
    {
        long ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');
        if (neg)
            return -ret;
        return ret;
    }

    public double nextDouble() throws IOException
    {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');

        if (c == '.')
        {
            while ((c = read()) >= '0' && c <= '9')
            {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException
    {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1)
            buffer[0] = -1;
    }

    private byte read() throws IOException
    {
        if (bufferPointer == bytesRead)
            fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException
    {
        if (din == null)
            return;
        din.close();
    }
}
   	 	 	 	   	  		  		 				 		