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, l, r, res):
    # print("in solve", curr, st, turn, res)
    if curr==1 and l<=r:
        res.append(1)
        res.append(2)
        res.append(1)

        l+=3
        curr=3
    
    while l<=r:
        # print(l,r,res)
        if turn:
            res.append(curr)
            l+=1
            turn=False
        elif turn is False and st<curr:
            res.append(st)
            l+=1
            st+=1
            turn=True
        else:
            res.append(1)
            l+=1
            turn=True
            curr+=1
            st=2
        
    return res

t = int(input())
for _ in range(t):
    n, l, r = [int(x) for x in input().strip().split()]
    res= []
    ind = bisect.bisect_right(dp,l)
    if dp[ind-1]==l:
        # print("in 1")
        curr = ind
        st = 2
        turn=True
        res = solve(curr,st,turn,l,r,res)
    else:
        # print("in 2")
        curr = ind
        offset = l-dp[ind-1]
        if offset%2==0:
            turn = True
        else:
            turn = False
        
        st = 2+offset//2
        res = solve(curr, st, turn, l, r, res)
    
    # res_string = "".join(str(r) for r in res)
    print(*res[:r-l+1])

