import sys
input = sys.stdin.readline


t = int(input())
for _ in range(t):
  N, l, r = map(int, input().split())
  tt = 0
  y = 0
  x = 0
  for i in range(N):
    tt += (N - i - 1) * 2
    if tt <= l:
      x = i
      y = tt
  table = []
  for i in range(x + 1, N):
    table.append(x + 1)
    table.append(i + 1)
  for i in range(x + 2, N):
    table.append(x + 2)
    table.append(i + 1)
  table.append(1)
  #print(table)
  print(*table[l - y - 1: r - y])