import java.io.File;
import java.io.IOException;
import java.util.Scanner;

public final class Main
{
	static final long mod = 998244353l;
	static long gain[];

	public static void main(String[] args) throws IOException
	{
		Scanner in = getScan(args);
		int t = in.nextInt();
		while (t-- > 0)
		{
			int n = in.nextInt();
			long l = in.nextLong();
			long r = in.nextLong();
			int xl = getSeq(l, n);
			int xr = getSeq(r, n);
			long next = l - (2 * n - 1) * (xl - 1) + (xl - 1) * (xl - 1) - 1;
			for (int i = xl; i <= xr; i++)
			{
				long max = Math.min(r - (2 * n - 1) * (i - 1) + (i - 1) * (i - 1), 2 * (n - i));
				for (long j = next; j < max; j++)
				{
					if (j % 2 == 0) System.out.print(i + " ");
					else System.out.print(i + j / 2 + 1 + " ");
				}
				next = 0;
			}
			if (r == (long) (n - 1) * n + 1) System.out.print(1);
			System.out.println();
		}
	}

	public static int getSeq(long l, int n)
	{
		return (int) Math.floor(0.5d * (2 * n - 1 - Math.sqrt((2 * n - 1) * (2 * n - 1) - 4 * l))) + 1;
	}

	public static int log2nlz(int bits)
	{
		if (bits == 0) return 0; // or throw exception
		return 31 - Integer.numberOfLeadingZeros(bits);
	}

	static Scanner getScan(String[] args) throws IOException
	{
		if (args.length == 0)
		{
			return new Scanner(System.in);
		}
		else
		{
			return new Scanner(new File(args[0]));
		}
	}

}

class Node
{
	int val;
	int deg;
	int par;
	int i;
	long nbChild;

	Node(int i)
	{
		this.i = i;
	}

	@Override
	public String toString()
	{
		return i + " " + val;
	}
}
