import sys

input = sys.stdin.readline

for _ in range(int(input())):
    n,l,r = map(int,input().split())

    first = 0
    if l==1:
        L = 1
    else:
        tmp = 1
        L = 1
        for i in range(1,n):
            if tmp + 2*i < l:
                tmp += 2*i
                L += 1
            else:
                break
        L += 1
        first = tmp

    if r==1:
        R = 1
    else:
        tmp = 1
        R = 1
        for i in range(1,n):
            if tmp + 2*i < r:
                tmp += 2*i
                R += 1
            else:
                break
        R += 1


    res = []
    for i in range(L,R+1):
        if i==1:
            res += [1]
        else:
            for j in range(2,i):
                res += [i,j]
            res += [i,1]
    #print(first,L,R)
    #print(res)
    print(*res[l-first-1:r-first])
