import os
from io import BytesIO

input = BytesIO(os.read(0, os.fstat(0).st_size)).readline

t = int(input())

def visit(k):
	if k == 1:
		return [1]
	else:
		res = [k]
		for i in range(2, k):
			res.append(i)
			res.append(k)
		res.append(1)
		return res

def visitlen(k):
	if k == 1:
		return 1
	else:
		return 2 * (k-1)


for _ in range(t):
	n, left, right = list(map(int, input().split()))
	
	interval = right-left+1
	if left == 1:
		i = 1
		res = []
		while interval > 0:
			temp = visit(i)
			res.extend(visit(i))
			i += 1
			interval -= len(temp)

		for each in res[:right]:
			print(each, end = " ")
		print()

	else:
		i = 1
		while visitlen(i) < left:
			left -= visitlen(i)
			i += 1

		res = []
		res.extend(visit(i)[left-1:])
		intervalc = interval
		intervalc -= len(res)
		while intervalc > 0:
			i += 1
			res.extend(visit(i))
			intervalc -= visitlen(i)

		for each in res[:interval]:
			print(each, end = " ")
		print()

		

	
	



