import sys
#input = sys.stdin.readline
input = sys.stdin.buffer.readline

def main():
    t = int(input())
    for _ in range(t):
        n, l, r = map(int, input().split())
        s = 0
        flagl = True
        flagr = True
        for i in range(2, n+1):
            pre_s = s
            if i == 2:
                s += 3
            else:
                s += 2*i-2
            if flagl:
                if s >= l:
                    il = l - pre_s
                    bl = i
                    flagl = False
            if flagr:
                if s >= r:
                    ir = r - pre_s
                    br = i
                    flagr = False
        #print(bl, il)
        #print(br, ir)
        il -= 1
        ir -= 1
        ans = []
        for i in range(bl, br+1):
            if i == 2:
                temp = [1, 2, 1]
            else:
                temp = [0]*(2*i-2)
                c = 2
                for j in range(2*i-2):
                    if j%2 == 0:
                        temp[j] = i
                    else:
                        if j != 2*i-3:
                            temp[j] = c
                            c += 1
                        else:
                            temp[j] = 1
            if i == bl:
                ans += temp[il:]
            elif i == br:
                ans += temp[0:ir+1]
            else:
                ans += temp
        print(*ans)

if __name__ == '__main__':
    main()
