#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long NINF = 0xc0c0c0c0c0c0c0c0;
inline long long read() {
  long long X = 0, w = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    w |= ch == '-';
    ch = getchar();
  }
  while (isdigit(ch)) X = (X << 3) + (X << 1) + (ch ^ 48), ch = getchar();
  return w ? -X : X;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
const long long mod = 1e9 + 7;
const long long maxn = 300000 + 5;
long long a[maxn], b[maxn];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    long long numl = -1, numr = -1;
    for (long long i = (1); i <= (n); ++i) {
      if (i * i - i + 1 >= l) {
        numl = i;
        break;
      }
    }
    for (long long i = (1); i <= (n); ++i) {
      if (i * i - i + 1 >= r) {
        numr = i;
        break;
      }
    }
    if (numl == -1) numl = n;
    if (numr == -1) numr = n;
    long long l1 = l, r1 = r;
    if (numl != 1) l1 = l - ((numl - 1) * (numl - 1) - (numl - 1) + 1);
    if (numr != 1) r1 = r - ((numr - 1) * (numr - 1) - (numr - 1) + 1);
    if (numl == numr) {
      for (long long i = (l1); i <= (r1); ++i) {
        if (i & 1)
          cout << numl << " ";
        else {
          if (i != 2 * numl - 2) {
            cout << i / 2 + 1 << " ";
          } else
            cout << 1 << " ";
        }
      }
    } else {
      if (numl == 1) {
        for (long long i = (l1); i <= (1); ++i) {
          if (i & 1)
            cout << numl << " ";
          else {
            if (i != 2 * numl - 2) {
              cout << i / 2 + 1 << " ";
            } else
              cout << 1 << " ";
          }
        }
      } else {
        for (long long i = (l1); i <= (2 * numl - 2); ++i) {
          if (i & 1)
            cout << numl << " ";
          else {
            if (i != 2 * numl - 2) {
              cout << i / 2 + 1 << " ";
            } else
              cout << 1 << " ";
          }
        }
      }
      numl++;
      while (numl < numr) {
        for (long long i = (1); i <= (2 * numl - 2); ++i) {
          if (i & 1)
            cout << numl << " ";
          else {
            if (i != 2 * numl - 2) {
              cout << i / 2 + 1 << " ";
            } else
              cout << 1 << " ";
          }
        }
        numl++;
      }
      for (long long i = (1); i <= (r1); ++i) {
        if (i & 1)
          cout << numr << " ";
        else {
          if (i != 2 * numr - 2) {
            cout << i / 2 + 1 << " ";
          } else
            cout << 1 << " ";
        }
      }
    }
    cout << "\n";
  }
  return 0;
}
