from bisect import bisect_left

mx = 100005
cum = [0]*mx
cum[1] = 1
for i in range(2,mx):
    cum[i] = 2*(i-1) + cum[i-1]

def get(x):
    if x==1: return [1]
    return [a for i in range(2,x) for a in [x,i]] + [x, 1]

def solve():
    n,l,r = map(int,input().split())
    xL = bisect_left(cum, l)
    xR = bisect_left(cum, r)
    hL = l - cum[xL-1] - 1
    hR = r - cum[xR-1] - 1
    if xL==xR:
        u = get(xL)
        print(*u[hL:hR+1])
        return
    uL, uR = get(xL), get(xR)
    print(*uL[hL:], end=" ")
    for x in range(xL+1, xR):
        print(*get(x), end=" ")
    print(*uR[:hR+1])
    return

for _ in range(int(input())):
    solve()
