for _ in range(input()):
    n,l,r = map(int,raw_input().split())
    i = 1
    s = 0
    while s+(n-i)*2<l:
        s+=(n-i)*2
        i+=1
        if n==i and s<l:
            s+=1
            break
    
    c = 0
    j = i+1
    while c<(r-l+1):
        if c==0:
            for x in range(1,2*(n-i)+1):
                if x+s<l:
                    if x%2==0:
                        j+=1    
                    continue
                
                if c<(r-l+1):
                    if x%2:
                        print i,
                    else:
                        print j,
                        j+=1
                    c+=1
                    
                
        else:
            for x in range(1,2*(n-i)+1):
                if c<(r-l+1):
                    if x%2:
                        print i,
                    else:
                        print j,
                        j+=1
                    c+=1
        if c==r-l and r==n*(n-1)+1:
            print 1,
            break
        i+=1
        j = i+1
    print