import sys
input=sys.stdin.readline
def search(n,k):
    if k==1:
        return 1
    ok=n
    ng=1
    while ok-ng>1:
        mid=(ok+ng)//2
        if mid*(mid-1)+1<k:
            ng=mid
        else:
            ok=mid
    return ok

def cycle_list(k):
    if k==1:
        return [1]
    Ret=[]
    for i in range(2,k):
        Ret.append(k)
        Ret.append(i)
    Ret.append(k)
    Ret.append(1)
    return Ret

def query(n,l,r):
    cycle_l=search(n,l)
    if cycle_l==1:
        l_idx=1
    else:
        l_idx=l-((cycle_l-1)*(cycle_l-2)+1)
    cycle_r=search(n,r)
    if cycle_r==1:
        r_idx=1
    else:
        r_idx=r-((cycle_r-1)*(cycle_r-2)+1)
    #print(cycle_l,l_idx,cycle_r,r_idx)
    if cycle_l==cycle_r:
        Ans=cycle_list(cycle_l)[l_idx-1:r_idx]
    else:
        L=cycle_list(cycle_l)
        R=cycle_list(cycle_r)
        Ans=L[(l_idx-1):]
        for i in range(cycle_l+1,cycle_r):
            Ans+=cycle_list(i)
        Ans+=R[:r_idx]
    return Ans
        
def main():
    t=int(input())
    for _ in range(t):
        n,l,r=map(int,input().split())
        Ans=query(n,l,r)
        print(*Ans)
    
if __name__=='__main__':
    main()