import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {

    private static Scanner sc = new Scanner(new BufferedInputStream(System.in));

    public static void main(String[] args) {
        work();
    }

    private static void work() {
        int t = sc.nextInt();
        for (int i = 0; i < t; i++) {
            int n = sc.nextInt();
            long l = sc.nextLong(), r = sc.nextLong();
            printResult(l, r);
        }
    }

    private static void printResult(long l, long r) {
        StringBuffer stringBuffer = new StringBuffer();
        long n = (long) Math.sqrt(l);
        int cnt = 0;
        long  p = l, bias;
        while (cnt < r - l + 1) {
            bias = p - n * (n - 1) - 1;
            if (bias % 2 == 1)
                stringBuffer.append(n + 1).append(' ');
            else {
                if (bias / 2 == n)
                    stringBuffer.append(1).append(' ');
                else
                    stringBuffer.append(bias / 2 + 1).append(' ');
            }
            p++;
            cnt++;
            if (p > n * (n + 1) + 1)
                n++;
        }
        System.out.println(stringBuffer);
    }

}
