from collections import defaultdict


def arrinp():
    return [*map(int, input().split(' '))]


def mulinp():
    return map(int, input().split(' '))


def intinp():
    return int(input())


def solution():
    n, l, r = mulinp()
    lo, hi = 1, n
    while lo <= hi:
        k = (lo + hi) // 2
        s = k * (2*n-1-k)
        if s < l:
            lo = k + 1
        else:
            hi = k - 1
    k = lo
    s = k * (2*n-1-k)
    b = k
    row = []
    for i in range(b+1, n+1):
        row.append(b)
        row.append(i)
    ans = row[l-s-1:]
    d = r-l+1
    if len(ans) >= d:
        return ans[:d]
    while len(ans) < d:
        b += 1
        row = []
        for i in range(b + 1, n + 1):
            row.append(b)
            row.append(i)
        if not row:
            break
        ans += row
    ans.append(1)
    print(*ans[:d])


testcases = 1
testcases = int(input())
for _ in range(testcases):
    solution()
