def checklevel(a):
    currp = 0
    currc = 0
    for i in a:
        if currp > i[0]:
            return 'NO'
        if currc > i[1]:
            return 'NO'
        if i[1]-currc > i[0]-currp:
            return 'NO'
        currp = i[0]
        currc = i[1]
    return 'YES'

def problem1():
    l = int(input())
    a = []
    for _ in range(l):
        a.append(list(map(int,input().split())))
    print(checklevel(a))

def makewealthy(a,x):
    total = a[0]
    if a[0] < x:
        return 0
    i = 1
    b = x
    while i < len(a):
        total += a[i]
        b += x
        if total < b:
            return i
        i += 1
    return len(a)

def problem2():
    l,x = list(map(int,input().split()))
    a   = list(map(int,input().split()))
    a.sort(reverse=True)
    print(makewealthy(a,x))

def minbullets(s):
    b = 0
    l = len(s)
    for i in range(l):
        b += max (0, s[(i+1)%l][0] - s[i][1])
    return min(i[0] for i in s) + b

def problem3():
    l = int(input())
    a = []
    for _ in range(l):
        a.append(list(map(int,input().split())))
    print(minbullets(a))

def eulercycle(n,l,r):
    i = 0
    k = n-1
    if l == n*(n-1)+1:
        return [1]
    while i < l:
        i += 2*k
        k -= 1
    s = []
    a = n
    for j in range(i+1-l):
        if j%2 == 0:
            s.append(a)
            a -= 1
        else:
            s.append(n-k-1)
    s = s[::-1]
    k = n-k
    a = k
    add = False
    if r == n*(n-1)+1:
        r -= 1
        add = True
    for j in range(r-i):
        if j%2 == 0:
            if a == n:
                k += 1
                a = k
            s.append(k)
        else:
            a += 1
            s.append(a)
    if add:
        s.append(1)

    return(s)

def problem4():
    n,l,r = list(map(int,input().split()))
    x = eulercycle(n,l,r)
    print(*x)

def divisors(n):
    s = []
    for i in range(1,n+1):
        if n%i == 0:
            s.append(i)
    return s

cases = int(input())
for _ in range(cases):
    problem4()    
    
