t = int(input())
for test in range(t):
    n,l,r = [int(x) for x in input().split()]
    ans = []
    if l<=(n-1)*2:
        x = (n-1)*2 - l
        st = n-(x//2)
        i = l
        k=2
        while i<=r:
            if i<(n-1)*2:
                if i%2==0:
                    ans.append(st)
                    st=st+1
                else:
                    ans.append(1)
            else:
                if i%2==0:
                    ans.append(n)
                else:
                    if k==n:
                        ans.append(1)
                    else:
                        ans.append(k)
                        k+=1
            i+=1
    else:
        l -= (n-1)*2
        r -= (n-1)*2
        x = (n-1)*2-1-l
        st = (n+1)-((x//2)+1)
        #print(st,x,l)
        i = l
        while i<=r:
            if i%2==0:
                ans.append(n)
            else:
                if st==n:
                    ans.append(1)
                else:
                    ans.append(st)
                    st=st+1  
            i+=1   
    print(*ans)       

