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 - 2) + li[i - 1]) 
	

	

	start = n

	for i in range(n, 0, -1):

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

	st = ''

	
	

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

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

		

		flag = base%2
		num = 2
		temp = l

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

		while(temp <= r and num <= i - 1 - base//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 = 2

			while(num <= a - 1 and temp <= r):

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

				if(temp <= r):
					st += str(a) + " "
					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 = 2

			

			while(num <= a - 1 and temp <= r):

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

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

			
			if(temp <= r):

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

			a += 1





	print(st)























		













