import sys

readline = sys.stdin.readline
read = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def make(x):
    if x == 1:
        return list()
    f = [x]*(x-1)*2
    for i in range(x-1):
        f[i*2] = i + 1
    return f

def solve():
    n, l, r = nm()
    ok, ng = 0, l
    while ng - ok > 1:
        mid = (ng + ok) // 2
        if mid * (mid - 1) < l:
            ok = mid
        else:
            ng = mid
    t = ok + 1
    l -= (ok-1)*ok
    r -= (ok-1)*ok
    # print(t, l, r)
    g = list()
    while len(g) < r:
        g += make(t)
        t += 1
    # print(g[:20])
    print(*g[l-1:r])
    return


# solve()

T = ni()
for _ in range(T):
    solve()
