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

public class MinimumEulerCycle {

	// https://codeforces.com/contest/1334/problem/D
	
	public static void main(String[] args) throws IOException, FileNotFoundException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		//BufferedReader in = new BufferedReader(new FileReader("MinimumEulerCycle"));

		int t = Integer.parseInt(in.readLine());
		while (t --> 0) {
			StringTokenizer st = new StringTokenizer(in.readLine());
			long n = Integer.parseInt(st.nextToken());
			long l = Long.parseLong(st.nextToken());
			long r = Long.parseLong(st.nextToken());
			long curnum = 2;
			long cursum=1;
			while (cursum + (curnum-1)*2 < l) {
				cursum += (curnum-1)*2;
				curnum++;
			}
			
			StringBuilder sb = new StringBuilder();
			while (cursum <= r) {
				if (cursum >= l && cursum <= r) {
					sb.append("1 ");
				}
				cursum++;
				if (cursum >= l && cursum <= r) {
					sb.append(curnum + " ");
				}
				cursum++;
				for (long i=2; i< curnum; i++) {
					if (cursum >= l && cursum <= r) {
						sb.append(i + " ");
					}
					cursum++;
					if (cursum >= l && cursum <= r) {
						sb.append(curnum + " ");
					}
					cursum++;
				}
				curnum++;
			}
			
//			long[] cur = new long[(int)(2*(curnum-1)+1)];
//			cur[0] = 1;
//			cur[1] = curnum;
//			int pointer=2;
//			for (long i=2; i< curnum; i++) {
//				cur[pointer] = i;
//				pointer++;
//				cur[pointer] = curnum;
//				pointer++;
//			}
//			cur[pointer] = 1;
//			StringBuilder sb = new StringBuilder();
//			for (int i=0; i<cur.length; i++) {
//				cursum++;
//				if (cursum >= l && cursum <= r) {
//					sb.append(cur[i] + " ");
//				}
//			}
			System.out.println(sb);
		}
	}
}