from sys import stdout
from bisect import bisect_left as bl

out = []

def solve(l, r, n):
    if l == n * (n - 1) + 1:
        out.append('1')
        return
    
    occs = [i for i in xrange(n - 1, 0, -1)]
    
    pref = [occs[i] for i in xrange(n - 1)]
    for i in xrange(1, n - 1): pref[i] = pref[i - 1] + occs[i]

    # pair number
    k = (l + 1) // 2
    
    # find the kth pair
    idx = bl(pref, k)

    # first element of each pair
    a = n - occs[idx]

    relpos = k
    if idx > 0: relpos -= pref[idx - 1]

    # second element of this pair
    b = a + relpos

    # time to print the answer
    ans = []
    cnt = r - l + 1

    x, y = a, b
    
    if l % 2 == 0:
        ans.append(str(b))
        cnt -= 1

        x, y = a, b + 1
    
    if y > n:
        x += 1
        y = x + 1

    if x == n: x = 1
        
    while cnt > 0:
        if cnt >= 2:
            ans.append(str(x))
            ans.append(str(y))
            cnt -= 2
        elif cnt == 1:
            ans.append(str(x))
            cnt -= 1

        y += 1
        if y > n:
            x += 1
            y = x + 1

        if x == n: x = 1

    out.append(' '.join(ans))

def main():
    for _ in xrange(input()):
        n, l, r = map(int, raw_input().strip().split())
        solve(l, r, n)

    stdout.write('\n'.join(out))

if __name__ == "__main__": main()