from sys import stdin,stdout
from math import gcd,sqrt,factorial,pi,inf
from collections import deque,defaultdict
from bisect import bisect,bisect_left
from time import time
from itertools import permutations as per
input=stdin.readline
R=lambda:map(int,input().split())
I=lambda:int(input())
S=lambda:input().rstrip('\r\n')
L=lambda:list(R())
P=lambda x:stdout.write(str(x)+'\n')
lcm=lambda x,y:(x*y)//gcd(x,y)
nCr=lambda x,y:(f[x]*inv((f[y]*f[x-y])%N))%N
inv=lambda x:pow(x,N-2,N)
sm=lambda x:(x**2+x)//2
N=10**9+7

for _ in range(I()):
	n,l,r=R()
	a=[1,2,1]
	b=[3,2,3,1]
	if l<=3:
		print(*a[3-(3-l+1):3-(3-r)],end=' ')
		l=4
	b[0]=b[2]=l//4+2
	j=l%4
	for i in range(r-l+1):
		print(b[j%4],end=' ')
		if 1!=b[j%4]!=2:
			b[j%4]+=1
		j+=1
	print()