import sys

__author__ = 'ratmir'

alphabet = "abcdefghijklmnopqrstuvwxyz"

def solve(n, a, graph):
    return 1

def execute():
    [t] = [int(x) for x in sys.stdin.readline().split()]
    results = []
    for ti in range(0, t):
        #[n] = [int(x1) for x1 in sys.stdin.readline().split()]
        [n, l, r] = [int(x1) for x1 in sys.stdin.readline().split()]

        # ec = []
        # for i in range(1, n+1):
        #     for j in range(i+1, n+1):
        #         ec.append(i)
        #         ec.append(j)
        # ec.append(1)

        cs = 1
        cis = 0
        while l>cis + 2 * (n-cs) and cs<n:
            #print l, cis
            cis += 2*(n-cs)
            cs += 1
        xx = l - cis - 1
        arr = []
        while r > cis and cs<n:
            for i in range(cs+1, n+1):
                arr.append(cs)
                arr.append(i)
            cis += 2*(n-cs)
            cs += 1
        arr.append(1)
        #print xx
        print(''.join('{} '.format(k) for k in arr[xx:xx+r-l+1]))
    print(''.join('{}\n'.format(k) for k in results))


execute()


# 1 2 1
# 1 2 1 3 2 3 1
# 1 2 1 3 1 4 2 3 2 4 3 4 1
# 1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5 1

