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

public class MinimumEulerCycle {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int t = Integer.parseInt(br.readLine());
		StringBuilder sb = new StringBuilder();

		while (t-- > 0) {
			StringTokenizer st = new StringTokenizer(br.readLine());
			int n = Integer.parseInt(st.nextToken());
			long l = Long.parseLong(st.nextToken());
			long r = Long.parseLong(st.nextToken());
			long edges = (long)n * (n - 1);
			while (l <= r) {
				if (l < 3){
					sb.append(l);
				} else if ((l - 3) % 4 == 0) {
					sb.append(1);
				} else if (l % 4 == 0 || (l + 2) % 4 == 0) {
					sb.append(2 + l / 4);
				} else {
					sb.append(1 + l / 4);
				}
				sb.append(' ');
				l++;
			}
			sb.setLength(sb.length()-1);
			sb.append('\n');
		}
		br.close();
		System.out.print(sb.toString());
	}
}