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

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Unstoppable solver = new Unstoppable();
		int t=in.nextInt();
		while(t-->0)
        solver.solve(in, out);
        out.close();
    }
 
    static class Unstoppable {
        public void solve(InputReader in, PrintWriter out) {
          int n=in.nextInt();
          long l=in.nextLong();
          long r=in.nextLong();
          long a=(n-1)*2;
          long index=((long)Math.sqrt((long)Math.pow(a-1,2)+4*l)-a+1)/(2*(a-1));
          long sum=(index/2)*(2*a+(index-1)*2);
          long rem=l-sum,count=0,flag=0;
         // out.println(a+" "+index+" "+rem);
          ArrayList<Integer> array=new ArrayList<Integer>();
          for(int i=(int)index+1;i<=n;i++){
              if(rem>(n-i)*2){ rem-=(n-i)*2; continue; }
              for(int j=i+1;j<=n;j++){
                  if(rem<=1&&count<r-l+1) { array.add(i); count++; } 
              rem--; 
                  if(rem<=1&&count<r-l+1) { array.add(j); count++; } 
              rem--;
              } if(count==r-l+1) break;
          }
          if(count<r-l+1) array.add(1);
          for(int i=0;i<array.size();i++) out.print(array.get(i)+" ");  out.println("");
        }
 
    }

 
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
 
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
 
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public long nextLong(){
            return Long.parseLong(next());
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
 
    }
}
 