from sys import stdin

rints = lambda: [int(x) for x in stdin.readline().split()]
for _ in range(int(input())):
    n, l, r = rints()
    be, su, cur, ans = 1, 1, n - 1, []

    while su + (cur << 1) < l:
        be += 1
        su += (cur << 1)
        cur -= 1

    lst = be

    for i in range(su, r + 1):
        if (i & 1):
            if lst >= n:
                be += 1
                lst = be
        else:
            lst += 1

        if i >= l:
            ans.append(be if (i & 1) else lst)

    if ans[-1] == n and r == n * (n - 1) + 1:
        ans[-1] = 1
    print(' '.join(map(str, ans)))
