
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.StringTokenizer;

public class d {
    public static void main(String[] args) {
        FS in = new FS(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        int t = in.nextInt();
        while(t-->0) {
            long n = in.nextInt();
            long l = in.nextLong()-1;
            long r = in.nextLong();
            for(; l < 2*n-3; l++) {
                if(l%2 == 0) out.print("1 ");
                else out.print((l+3)/2 + " ");
            }
            long curr = 2*n-3;
            for(int i = 2; i < n; i++) {
                out.flush();
                long tmp = curr+2*(n-i);
                for(long j = l-curr; l < Math.min(tmp, r+1); j++, l++) {
                    if(j == 0) out.print(n + " ");
                    else if(j%2 == 1) out.print(i + " ");
                    else out.print(i+j/2 + " ");
                }
            }
            if(l <= n*(n-1) && r >= n*(n-1)) out.print(n + " ");
            if(r == n*(n-1)+1) out.print("1 ");
            out.println();
        }
        
        out.close();
    }
    
    static class FS {
        BufferedReader in;
        StringTokenizer token;
        
        public FS(InputStream str) {
            in = new BufferedReader(new InputStreamReader(str));
        }
        
        public String next() {
            if(token == null || !token.hasMoreElements()) {
                try {
                    token = new StringTokenizer(in.readLine());
                } catch (IOException ex) {
                }
                return next();
            }
            return token.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(next());
        }
        
        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}