rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())

def solve(N, L, R):
    L -= 1; R -= 1
    
    left = 0
    nxt = 1
    k = 1
    while left + nxt <= L:
        left += nxt
        k += 1
        if nxt == 1:
            nxt = 2
        else:
            nxt += 2
    # start writing from k
    def write(k):
        if k == 1:
            bns.append(1)
            return
        if k == 2:
            bns.append(2)
            bns.append(1)
            return
        
        for j in range(2, k):
            bns.append(k)
            bns.append(j)
        bns.append(k)
        bns.append(1)
        return

    bns = []
    while len(bns) < (R - left + 1):
        write(k)
        k += 1
    
    return bns[L - left: R - left + 1]
    

for tc in xrange(rri()):
    ans = solve(*rrm())
    print " ".join(map(str, ans))
