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 = []
  ttt = r - y
  ttt -= (tt < ttt)
  if l > tt:
    print(1)
    continue
  while len(table) < ttt:
    for i in range(x + 1, N):
      table.append(x + 1)
      table.append(i + 1)
    x += 1
  table.append(1)
  #print(table, x, y)
  print(*table[l - y - 1: r - y])