def getK(index, N):
    k = 0
    tot = 0
    while True:
        k = k + 1
        alt = tot + 2 * (N -k)
        #print(alt, index)
        if alt < index:
            tot = alt
        else:
            return k, tot
    

def getLoop(k, indexInLoop):
    if indexInLoop % 2 == 0:
        return k
    return indexInLoop//2 + k + 1


T = int(raw_input())
for t in range(T):
    N, L, R = [int(v) for v in raw_input().split()]
    if L == N * (N-1) +1:
        print('1')
    else:
        k, tot = getK(L, N)
        indexInLoop = L - tot- 1
        i = 0
        out = []
        R2 = R
        if R == N * (N-1) + 1:
            R2 = R -1

        while i < R2 - L + 1:
            res = getLoop(k, indexInLoop)
            indexInLoop += 1
            if indexInLoop >= 2 * (N -k):
                k += 1
                indexInLoop = 0
            out.append(str(res))

            i += 1
        if R == N * (N-1) + 1:
            out.append('1')

        print(' '.join(out))

     
