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

public class D {

    static void shuffleArray(int[] arr){
        Random rnd = new Random();
        for(int i = arr.length; i>0; i--){
            int ndx = rnd.nextInt(i+1);
            int tmp = arr[ndx];
            arr[ndx] = arr[i];
            arr[i] = tmp;
        }
    }

    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int tst = Integer.parseInt(br.readLine());
        //int tst = 1;
        while(tst-->0){
            String[] str = br.readLine().split(" ");
            int n = Integer.parseInt(str[0]);
            long l = Long.parseLong(str[1]), r = Long.parseLong(str[2]);
            int now = 0, i = 1;
            for(; i<=n; i++){
                now += 2*(n-i);
                if(i == n) break;
                if(now>=l){
                    now -= 2*(n-i);
                    break;
                }
            }
           if(i == n) sb.append(1).append('\n');
           else{
               now++;
               outer:for(; i<=n; i++){
                   if(i == n && now == r) sb.append(1);
                   for(int j = i+1; j<=n; j++){
                       if(now>r) break outer;
                       if(now>=l) sb.append(i+" ");
                       now++;
                       if(now>=l) sb.append(j+" ");
                       now++;
                   }
               }
               sb.append('\n');
           }
        }
        System.out.println(sb);
    }
}
