def main():
    n, l, r = map(int, input().split())
    if l >= 2:
        current = int(-1 + (1 - 4 * (2 - l)) ** 0.5) // 2 + 2
        sub = (l - (current - 3) * current) // 2

    for i in range(l, min(r, n * (n - 1) + 1) + 1):
        if i == 1:
            print(1, end=" ")
        elif i == 2:
            print(2, end=" ")
        elif i == 3:
            print(1, end=" ")
            current = 3
            sub = 2
        elif sub == current:
            if i % 2 == 0:
                print(current, end=" ")
            else:
                print(1, end=" ")
                current += 1
                sub = 2
        elif i % 2 == 0:
            print(current, end=" ")
        else:
            print(sub, end=" ")
            sub += 1
    print()


# for i in range(2, 100):
#     print(int(-1 + (1 - 4 * (2 - i)) ** 0.5) // 2 + 2, end=" ")
# print()
# for i in range(2, 100):
#     cur = int(-1 + (1 - 4 * (2 - i)) ** 0.5) // 2 + 2
#     print((i - (cur - 3) * cur) // 2, end=" ")

t = int(input())
for _ in range(t):
    main()
