T = int(input())

for _ in range(T):
    n, l, r = map(int, input().split())
    size = r - l + 1

    st = None
    en = None
    cur = 0
    offset = 0
    for i in range(1, n):
        if st is None and l < cur + (n-i)*2:
            st = i
            offset = l - cur - 1

        if en is None and r < cur + (n-i)*2:
            en = i

        cur += (n-i)*2

    if st is None:
        st = n
        
    if en is None:
        en = n
    
    arr = []
    for i in range(st, en):
        for j in range(i+1, n+1):
            arr.append(i)
            arr.append(j)
    
    if en == n:
        arr.append(1)
    else:
        pass
    
    print(' '.join(map(str, arr[offset:offset+size])))
    
