import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;


public class Solution {
    static Long arr[];
    public static void main(String[] args) throws IOException {
        FastReader in = new FastReader(System.in);
        StringBuilder sb = new StringBuilder();
        int i, j;
        int t=in.nextInt();
        while(t-->0){
            long n=in.nextInt();
            long l=in.nextLong();
            long r=in.nextLong();
            long x=1;
            long arr[]=new long[(int)(n+1)];
            arr[1]=1;
            for(i=2;i<=n;i++)
                arr[i]=n-i+2;
            long incr=2*n-3;
            int f=0;
            for(i=1;i<n;i++){
                x=x+incr;
                if(l<x) {
                    f=1;
                    break;
                }
                incr-=2;
            }
            if(f==0) {
                long z = l - x;
                long start = z + 1;
                for (long m = l; m <= r; m++) {
                    sb.append(start % n + 1).append(" ");
                    start++;
                }
                sb.append("\n");
                continue;
            }

            x=x-incr;
            if(l==x) {
                sb.append(arr[i]).append(" ");
                l++;
            }
            long z=l-x;

            if(r<x+incr){
                if(z%2==0) {
                    sb.append(arr[i]).append(" ");
                    l++;
                    z++;
                }
                long start=z/2+2;
                for(long m=l;m<=r;m+=2){
                    sb.append(start).append(" ").append(i).append(" ");
                    start++;
                }
                if((r-l)%2==0)
                    sb.append(start).append(" ");
                sb.append("\n");
                continue;
            }

            if(z%2==0) {
                sb.append(arr[i]).append(" ");
                l++;
                z++;
            }
            long start=z/2+2;
            for(long m=l;m<=r;m+=2){
                if(start==(arr[i+1])){
                    break;
                }

                sb.append(start).append(" ").append(arr[i]).append(" ");
                l+=2;
                start++;
            }

            long p=l-incr,count=0,val=2,dif=0;
            int f1=0;
            if(r>(n*(n-1)+1-n)){
                f1=1;
                dif=r-(n*(n-1)+1-n);
                r=(n*(n-1)+1-n);
            }
            for(long m=l;m<=r;m++){
                if(m==p+incr){
                   i++;
                    p=p+incr;
                   incr-=2;
                   sb.append(arr[i]).append(" ");
                   val=2;
                   continue;
                }
                if((m-p)%2==0)
                    sb.append(arr[i]).append(" ");
                else {
                    sb.append(val).append(" ");
                    val++;
                }

            }
            //System.out.println(f1+" "+dif);
            if(f1==1){
                long st=1;
                for(long m=0;m<=(dif-1);m++) {
                    sb.append(st%n+1).append(" ");
                    st++;
                }

            }
            sb.append("\n");










        }
        System.out.print(sb);


    }
}
class FastReader {

    byte[] buf = new byte[2048];
    int index, total;
    InputStream in;

    FastReader(InputStream is) {
        in = is;
    }

    int scan() throws IOException {
        if (index >= total) {
            index = 0;
            total = in.read(buf);
            if (total <= 0) {
                return -1;
            }
        }
        return buf[index++];
    }

    String next() throws IOException {
        int c;
        for (c = scan(); c <= 32; c = scan()) ;
        StringBuilder sb = new StringBuilder();
        for (; c > 32; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    }

    int nextInt() throws IOException {
        int c, val = 0;
        for (c = scan(); c <= 32; c = scan()) ;
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    }

    long nextLong() throws IOException {
        int c;
        long val = 0;
        for (c = scan(); c <= 32; c = scan()) ;
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    }
}
