
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class a {

	static class pair implements Comparable<pair> {
		long x, y;

		public pair(long l, long m) {
			x = l;
			y = m;
		}

		@Override
		public String toString() {
			return "(" + x + " " + y + ")";
		}

		@Override
		public int compareTo(pair o) {
			// TODO Auto-generated method stub
			return (int) (x - o.x);
		}
	}

	static class UnionFind {
		int[] p, rank, setSize;
		int numSets;

		public UnionFind(int N) {
			p = new int[numSets = N];
			rank = new int[N];
			setSize = new int[N];
			for (int i = 0; i < N; i++) {
				p[i] = i;
				setSize[i] = 1;
			}
		}

		public int findSet(int i) {
			return p[i] == i ? i : (p[i] = findSet(p[i]));
		}

		public boolean isSameSet(int i, int j) {
			return findSet(i) == findSet(j);
		}

		public void unionSet(int i, int j) {
			if (isSameSet(i, j))
				return;
			numSets--;
			int x = findSet(i), y = findSet(j);
			if (rank[x] > rank[y]) {
				p[y] = x;
				setSize[x] += setSize[y];
			} else {
				p[x] = y;
				setSize[y] += setSize[x];
				if (rank[x] == rank[y])
					rank[y]++;
			}
		}

		public int numDisjointSets() {
			return numSets;
		}

		public int sizeOfSet(int i) {
			return setSize[findSet(i)];
		}
	}

	static ArrayList<Integer> primes;
	static int[] isComposite;

	static void sieve(int N) // O(N log log N)
	{
		isComposite = new int[N + 1];
		isComposite[0] = isComposite[1] = 1; // 0 indicates a prime number
		primes = new ArrayList<Integer>();

		for (int i = 2; i <= N; ++i) // can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
			if (isComposite[i] == 0) // can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				if (1l * i * i <= N)
					for (int j = i * i; j <= N; j += i) // j = i * 2 will not affect performance too much, may alter in
														// modified sieve
						isComposite[j] = 1;
			}
	}

	static boolean isPrime(int N) {
		if (N < isComposite.length)
			return isComposite[N] == 0;
		for (int p : primes) // may stop if p * p > N
			if (N % p == 0)
				return false;
		return true;
	}

	static int m;
	static ArrayList<pair> mask;

	// generated by sieve

	/*
	 * 1. Generating a list of prime factors of N
	 */
	static ArrayList<Integer> primeFactors(int N) // O(sqrt(N) / ln sqrt(N))
	{
		ArrayList<Integer> factors = new ArrayList<Integer>(); // take abs(N) in case of -ve integers
		int idx = 0, p = primes.get(idx);

		while (p * p <= N) {
			while (N % p == 0) {
				factors.add(p);
				N /= p;
			}
			p = primes.get(++idx);
		}

		if (N != 1) // last prime factor may be > sqrt(N)
			factors.add(N); // for integers whose largest prime factor has a power of 1
		return factors;
	}

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(br.readLine());
		int te = Integer.parseInt(st.nextToken());
		while (te-- > 0) {
			st = new StringTokenizer(br.readLine());
			int n = Integer.parseInt(st.nextToken());
			long l = Long.parseLong(st.nextToken());
			long r = Long.parseLong(st.nextToken());
			long dif = r - l + 1;
			if (l == 1) {
				if (dif > 1) {
					pw.print(1 + " " + 2+" ");
					l = 3;
				} else {
					pw.print(1 + " ");
					l = 2;
				}
			}
			dif = r - l + 1;
			long x = bs(l);
			long g = l - x * (x + 1) - 1;
			x+=2;
			long start = 0;
			if (g == 0) {
				start = 2;
				if (dif > 1) {
					pw.print(1 + " " + x + " ");
					dif -= 2;
				} else {
					pw.print(1);
					dif -= 1;
				}
			} else if (g % 2 == 1) {
				pw.print(x);
				start = g / 2 + 2;
				dif--;
			} else {
				start = g / 2 + 1;
			}
			while (dif > 0) {
				if (start < x) {
					if (dif == 1) {
						pw.print(start);
						dif--;
					} else {
						dif -= 2;
						pw.print(start + " " + x + " ");
						start++;
					}
				} else {
					if (start == x) {
						x++;
						if (dif == 1) {
							pw.print(1);
							dif--;
						} else {
							dif -= 2;
							pw.print(1 + " " + x + " ");
							start = 2;
						}
					}
				}
			}
			pw.println();
		}
		pw.flush();
	}

	public static long bs(long x) {
		long lo = 0;
		long hi = (long) 1e9;
		long ans = -1;
		while (lo <= hi) {
			long mid = (lo + hi) / 2;
			long sum = mid * (mid + 1);
			if (sum <= x) {
				ans = mid;
				lo = mid + 1;
			} else
				hi = mid - 1;
		}
		return ans;
	}

}