import java.util.*;
import java.io.*;
 
public class Solution{
	static PrintWriter out=new PrintWriter(System.out);
	public static void main (String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
		String[] input=br.readLine().trim().split(" ");
		
		int numTestCases=Integer.parseInt(input[0]);
		while(numTestCases-->0){
		    input=br.readLine().trim().split(" ");
		    int n=Integer.parseInt(input[0]);
    		long l=Long.parseLong(input[1]);
    		long r=Long.parseLong(input[2]);
    		printSequence(n,l,r);
		}
        
		
		out.flush();
		out.close();
	}
	public static void printSequence(int n,long l,long r)
	{
	    long totalElements=0;
	    int blockNumber=-1;
	    for(int i=1;i<n;i++){
	        totalElements+=2L*(n-i);
	        if(totalElements>l)
	        {
	            totalElements-=2L*(n-i);
	            blockNumber=i;
	            break;
	        }
	    }
	    ArrayList<Integer> ans=new ArrayList<>();
	    long pos=totalElements+1;
	    for(int b=blockNumber;b<n && pos<r;b++){
	        for(int i=b+1;i<=n;i++){
	            int currNumber=b;
	            if(pos>=l && pos<=r){
	                ans.add(currNumber);
	            }
	            pos++;
	            currNumber=i;
	            if(pos>=l && pos<=r){
	                ans.add(currNumber);
	            }
	            pos++;
	        }
	    }
	    if(pos==r)
        {
            ans.add(1);
        }
        for(int i=0;i<ans.size();i++){
            out.print(ans.get(i)+" ");
        }
	    out.println();
	}
}