T = input()

for _ in xrange(T):
    n, l, r = map(int, raw_input().split())

    now = 0
    sn = 2

    result = []
    need = r-l+1

    while len(result) < need:
        if now+1 >= l:
            result.append("1")
            result.append(str(sn))

        now += 2

        if (sn-2) * 2 + now+1 < l:
            now += (sn-2) * 2
            sn += 1
            continue

        for i in xrange(2, sn):
            if now+1 >= l:
                result.append(str(i))
                result.append(str(sn))

            now += 2

        sn += 1

        #print now, sn, l, r, result

    print " ".join(result[:need])