import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class TaskD {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        PrintWriter pw = new PrintWriter(System.out);
        
        try {
            int t = Integer.parseInt(br.readLine());
            while(t-->0) {
                st = new StringTokenizer(br.readLine());
                int n = Integer.parseInt(st.nextToken());
                long l = Long.parseLong(st.nextToken());
                long r = Long.parseLong(st.nextToken());

                long ind = 0;
                ArrayList<Integer> al = new ArrayList<>();
                for(int i=0 ; i<n ; i++) {
                    if(i == n-1) {
                        if(ind+1 == r) {
                            al.add(1);
                        }
                    }
                    else {
                        long clen = (n-i-1)*2;
                        long beg = ind+1;
                        long end = ind+clen-1;
                        if(beg <= l && end >= r) {
                            int[] a = new int[(int)clen];
                            int x = i+1;
                            int y = i+2;
                            for(int j=0 ; j<clen ; j++) {
                                if(j%2 == 0) a[j] = x;
                                else {
                                    a[j] = y;
                                    y++;
                                }
                            }

                            int starts = (int)(l-beg);
                            int ends = (int)(r-beg+1);
                            for(int j=starts ; j<=ends ; j++) {
                                al.add(a[j]);
                            }
                        }
                        else if(beg > l && end < r) {
                            int[] a = new int[(int)clen];
                            int x = i+1;
                            int y = i+2;
                            for(int j=0 ; j<clen ; j++, y++) {
                                if(j%2 == 0) a[j] = x;
                                else {
                                    a[j] = y;
                                    y++;
                                }
                            }

                            int starts = (int)(beg-beg);
                            int ends = (int)(end-beg+1);
                            for(int j=starts ; j<=ends ; j++) {
                                al.add(a[j]);
                            }
                        }
                        else if(beg <= l && end < r && end >= l) {
                            int[] a = new int[(int)clen];
                            int x = i+1;
                            int y = i+2;
                            for(int j=0 ; j<clen ; j++, y++) {
                                if(j%2 == 0) a[j] = x;
                                else {
                                    a[j] = y;
                                    y++;
                                }
                            }

                            int starts = (int)(l-beg);
                            int ends = (int)(end-beg+1);
                            for(int j=starts ; j<=ends ; j++) {
                                al.add(a[j]);
                            }
                        }
                        else if(beg > l && end >= r && r >= beg) {
                            int[] a = new int[(int)clen];
                            int x = i+1;
                            int y = i+2;
                            for(int j=0 ; j<clen ; j++, y++) {
                                if(j%2 == 0) a[j] = x;
                                else {
                                    a[j] = y;
                                    y++;
                                }
                            }

                            int starts = (int)(beg-beg);
                            int ends = (int)(r-beg+1);
                            for(int j=starts ; j<=ends ; j++) {
                                al.add(a[j]);
                            }
                        }

                        ind += clen;
                    }
                }

                for(int i=0 ; i<al.size() ; i++) {
                    pw.print(al.get(i) + " ");
                }
                pw.println();
            }
        }
        finally {
            pw.flush();
            pw.close();
        }
    }
}
