import java.io.*;
import java.util.*;
public class Solution {
	static Scanner sc=new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);
	//Main Method
	public static void main(String args[]) {
		int test=sc.nextInt();
		while(test-->0) {
			int n=sc.nextInt();
			long l=sc.nextLong(),r=sc.nextLong();
			long N=1,M=1;
			for(long i=1;i<=100000;i++) {
				if(i*(i-1)+1<l) N=i;
				if(i*(i-1)+1<r) M=i;
			}
			N++;M++;
			l-=(N-1)*(N-2);
			r-=(N-1)*(N-2);
			int cur=1;
			//out.println("range: "+N+" "+M);
			for(long i=N;i<=M;i++) {
				long idx=1;
				for(int j=0;j<2*(i-1);j++) {
					if(cur>r) break;
					long val=idx;
					if(j%2==1) {
						val=i;
						idx++;
					}
					if(cur>=l && cur<=r) out.print(val+" ");
					cur++;
				}
				if(cur>r) break;
			}
			if(cur==r) out.print(1);
			out.println();
		}
		out.flush();
		out.close();
	}
}
