t = int(input())

for i in range(t):

	n, l, r = list(map(int, input().split()))

	li = [0, 1, 2]

	for i in range(3, n+1):

		li.append(2*(i - 1) + li[i - 1]) 

	start = n

	for i in range(1, n+1):

		if(l >= li[i]):
			start = i
			break

	st = ''

	base = l - start
	temp = l
	if( i != 1 ):

		pairs = i - 2
		pairs -= base//2

		flag = base%2
		num = i - 1 - base//2
		temp = l

		if (flag == 0):
			st += str(i) + " "
			temp += 1

		while(temp < r and num >= 2):

			st += str(num) + " "
			temp += 1

			if(temp < r):
				st += str(i) + " "
				temp += 1
			num -= 1

		if(temp < r):

			st += str(1) + " "
			temp += 1

		a = i + 1
		while(temp < r):

			st += str(a) + " "
			temp += 1

			num = a - 1

			while(num >= 2 and temp < r):

				st += str(num) + " "
				temp += 1

				if(temp < r):
					st += str(i) + " "
					temp += 1
				num -= 1

			if(temp < r):

				st += str(1) + " "
				temp += 1

			a += 1

	else:

		st += str(1) + " "
		temp += 1


		a = 2
		while(temp <= r):

			st += str(a) + " "
			temp += 1

			num = a - 1

			while(num >= 2 and temp < r):

				st += str(num) + " "
				temp += 1

				if(temp < r):
					st += str(i) + " "
					temp += 1
				num -= 1

			if(temp < r):

				st += str(1) + " "
				temp += 1

			a += 1



	print(st)























		













