import sys
import heapq

def input():
    return sys.stdin.readline().strip()
 
def iinput():
    return int(input())
 
def rinput():
    return map(int, input().split())

def rlinput():
    return list(map(int, input().split()))

def YES(flag):
    if flag:
        return "YES"
    return "NO" 

def main():
    def F():
        return l <= w and w <= r
    #n = int(sys.stdin.readline().strip())
    
    n, l, r = rinput()
    res = []
    w = 1
    if F():
        res.append(1)
    for i in range(2, n):
        w += 1
        if F():
            res.append(i)
        w += 1
        if F():
            res.append(1)
    w += 1
    if F():
        res.append(n)
    for i in range(2, n):
        w += 1
        if F():
            res.append(i)
        for o in range(max(w + 1, l), min(w + (n - i - 1) * 2 + 1, r + 1)):
            if (o - w) % 2 == 0:
                res.append(i)
            else:
                res.append((o - w - 1) // 2 + i + 1)
        w += (n - i - 1) * 2 + 1
        if F():
            res.append(n)    
    w += 1
    if F():
        res.append(1)    
    print(*res)
for i in range(iinput()):
    main()