#n = int(input())
#used = [[False for _ in range(n)] for __ in range(n)]
#
#for i in range(n):
#    used[i][i] = True
#
#start = n - 1
#cur = 0
#
#res = []
#while True:
#    if cur == 0:
#        start -= 1
#    res += [cur + 1]
#    print(cur + 1)
#    for i in range(n):
#        if not used[cur][i] and not (start == 0 and i == 0):
#            used[cur][i] = True
#            cur = i
#            break
#    else:
#        print('error or done')
#        break
#res += [1]
#
#assert len(res) == n * (n-1) + 1
#
#s = ' '.join(map(str, res))
#for i in range(1,n+1):
#    for j in range(1,n+1):
#        if i == j: continue
#        assert f'{i} {j}' in s

def oracle(n, start, end):
    nod = 0
    t = n - 1
    ii = 0
    while start - ii >= t*2:
        if t == 0:
            nod += 1
            break
        nod += 1
        ii += t*2
        t -= 1
        if t < -10:
            import sys
            sys.exit()
    R = []
    for cur in range(nod, n):
        for v in range(cur+1, n):
            ii += 1
            if start <= ii <= end:
                R.append(cur + 1)
            ii += 1
            if start <= ii <= end:
                R.append(v + 1)
            if ii > end:
                return R
    ii += 1
    if start <= ii <= end:
        R.append(1)
    return R
t = int(input())

for _ in range(t):
    a,b,c = map(int,input().split())
    print(*oracle(a, b, c))
    

