import sys
#input=sys.stdin.buffer.readline
t=int(input())
for _ in range(t):
    n,l,r=map(int,input().split())
    le=1
    sub=2*n-2
    ri=le+sub-1
    for i in range(1,n+1):
        if l>=le and l<=ri:
            st=i
            break
        sub-=2
        le=ri+1
        ri=le+sub-1
    ch=0 
    if (l-le)%2==0:
        nex=st+(l-le)//2
        nex+=1
        if l<((n*(n-1)+1)):
            print(st,end=" ")
            l+=1
            ch+=1
    else:
        nex=st+(l-le+1)//2
    
    while l<=min(r,n*(n-1)):
        if ch%2==0:
            print(st,end=" ")
        else:
            print(nex,end=" ")
            nex+=1
            if nex>=n:
                st+=1
                #print(st)
                nex=st+1
        ch+=1
        l+=1
    if r==(n*(n-1)+1):
    	print(1,end=" ")
    print()    