#include <bits/stdc++.h>
using pii = std::pair<int, int>;
using pll = std::pair<long long, long long>;
void printChar(long long x, long long l, long long r, long long& curpos) {
  if (l <= curpos && curpos <= r) std::cout << x << " ";
  ++curpos;
}
long long print(long long s, long long e, long long l, long long r,
                long long curpos) {
  if (curpos > r) return curpos;
  if (s == e) {
    printChar(s, l, r, curpos);
    return curpos;
  }
  if (s == e - 1) {
    printChar(s, l, r, curpos);
    printChar(e, l, r, curpos);
    printChar(s, l, r, curpos);
    return curpos;
  }
  long long ns = s + 1;
  long long ne = e - 1;
  long long totalNextCycle = (e - (s + 1) + 1) * 2;
  if (curpos + totalNextCycle <= l) {
    curpos += totalNextCycle;
  } else {
    for (long long i = s + 1; i <= e; i++) {
      printChar(s, l, r, curpos);
      printChar(i, l, r, curpos);
    }
  }
  curpos = print(ns, ne, l, r, curpos);
  totalNextCycle = (ne - (ns + 1) + 1) * 2;
  if (curpos > r || curpos + totalNextCycle <= l) {
    curpos += totalNextCycle;
  } else {
    for (long long i = ns + 1; i <= ne; i++) {
      printChar(e, l, r, curpos);
      printChar(i, l, r, curpos);
    }
  }
  printChar(e, l, r, curpos);
  printChar(s, l, r, curpos);
  return curpos;
}
int main() {
  std::ios::sync_with_stdio(false);
  int t;
  std::cin >> t;
  while (t--) {
    long long n, l, r;
    std::cin >> n >> l >> r;
    print(1, n, l, r, 1);
    std::cout << std::endl;
  }
  return 0;
}
