#include <bits/stdc++.h>
using namespace std;
const char sp = ' ', nl = '\n';
int read() {
  int s = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    s = (s << 3) + (s << 1) + ch - '0', ch = getchar();
  }
  return s * f;
}
template <typename T>
void read(T &s) {
  s = 0;
  char ch = getchar();
  long long f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    s = (s << 3) + (s << 1) + ch - 48, ch = getchar();
  s *= f;
}
template <typename T, typename... A>
void read(T &f, A &...a) {
  read(f);
  read(a...);
}
void sc() {}
template <class T, class... A>
void sc(T &t, A &...a) {
  cin >> t, sc(a...);
}
void pr() {}
template <class T, class... A>
void pr(T t, A... a) {
  cout << t, pr(a...);
}
const int mod = 1e9 + 7, base = 131;
int t, n;
long long l, r;
int main() {
  t = read();
  while (t--) {
    read(n, l, r);
    int st = 1;
    long long cnt = 0;
    for (int i = 1; i < n; i++) {
      if (cnt + (2 * (n - i)) <= l) {
        st = i + 1;
        cnt += 2 * (n - i);
      } else
        break;
    }
    while (cnt < r) {
      if (st == n) {
        cnt++;
        if (cnt >= l && cnt <= r) pr(1, sp);
      }
      for (int i = st + 1; i <= n; i++) {
        cnt++;
        if (cnt >= l && cnt <= r) pr(st, sp);
        cnt++;
        if (cnt >= l && cnt <= r) pr(i, sp);
      }
      st++;
    }
    puts("");
  }
  return 0;
}
