import java.util.*;
import java.io.*;
public class Solution {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int test_cases = in.nextInt();
		while(test_cases-- > 0) {
			int num = in.nextInt();
			long left = in.nextLong();
			long right = in.nextLong();
			int temp = num - 1;
			long start = 1;
			while(left > 2*temp && temp != 0) {
				left -= 2*temp;
				right -= 2*temp;
				temp--;
				start++;
			}
			if(temp == 0) {
				System.out.println(1);
				continue;
			}
//			System.out.println(left + " " + start);
			long end = start + 1 + (left/2);
			if(left%2 == 1) {
				System.out.print(start + " ");
				right--;
			}
			for(int x = 0; x <= right - left; x++) {
				if(end == num + 1) {
					start++;
					if(start == num)
					{
						System.out.print(1 + " ");
						break;
					}
					end =start + 1;
				}
				if((x&1) == 0)
					System.out.print(end++ + " ");
				else
					System.out.print(start + " ");
			}
			System.out.println();
		}
	}

}