import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
from functools import lru_cache   #use @lru_cache(None)
if os.path.exists('in.txt'): sys.stdin=open('in.txt','r')
if os.path.exists('out.txt'): sys.stdout=open('out.txt', 'w')
#
def input(): return sys.stdin.readline()
def mapi(arg=0): return map(int if arg==0 else str,input().split())
#------------------------------------------------------------------
 
for _ in range(int(input())):
    n,l,r = mapi()
    tmp = n*(n-1)+1
    if l==tmp:
        print(1)
    else:
        total = 2*(n-1)
        cnt = 1
        while l>total:
            cnt+=1
            total+=2*(n-cnt)
        total -=2*(n-cnt)
        res = []
        pst = 0
        nxt = 0
        if (l-total)%2==0:
            tmp = cnt+(l-total)//2
            res.append(tmp)
            if tmp!=n:
                pst = cnt
                nxt = tmp+1
            else:
                pst,nxt = cnt+1,cnt+2
        else:
            pst = cnt
            nxt = cnt+(l-total)//2+1
        while len(res)-1<r-l:
            res.append(pst)
            res.append(nxt)
            if nxt==n:
                if pst==n-1: pst=1
                else:
                    pst +=1
                    nxt = pst+1
            else:
                nxt+=1
        print(*res[:r-l+1])