import bisect
dp = [None for i in range(10**5+2)]
prev = 2
dp[0] = 1
dp[1] = 2
for i in range(2,10**5+1):
    curr = prev+2*(i-1)
    dp[i] = curr
    prev = curr

def solve(curr, st, turn, n, l, r, res):
    while l<=r:
        if curr==n:
            res.append(1)
            l+=1
        else:

            if turn:
                res.append(curr)
                l+=1
                turn=False
            elif turn is False and st<n:
                res.append(st)
                l+=1
                st+=1
                turn=True
            else:
                res.append(st)
                l+=1
                turn=True
                curr+=1
                st=curr+1
        
    return res

t = int(input())
for _ in range(t):
    n, l, r = [int(x) for x in input().strip().split()]
    res= []

    curr=1
    i=n
    val=1
    while l>=curr and i>1:
        curr+=2*(i-1)
        i-=1
        val+=1

    curr_offset = l-curr

    if curr_offset<0:
        curr = val-1
    else:
        curr=val

    st_offset = l-curr+1

    if curr_offset%2==0:
        turn = True
    else:
        turn = False

    st = curr+1+(st_offset)//2
    # print(curr, st, turn)
    res = solve(curr, st, turn, n, l, r, res)
    print(*res[:r-l+1])

