#include <bits/stdc++.h>
using namespace std;
long long modExpo(long long x, long long n, long long m) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % m;
    x = (x * x) % m;
    n = n / 2;
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long t;
  t = 1;
  cin >> t;
  while (t--) {
    long long n, m, k, x = 0, y = 0, i, j, z = 0, sm = 0, ans = 0, flag = 1,
                       ind, l, r;
    cin >> n >> l >> r;
    long long cnt = 2 * (n - 1) - 1;
    for (i = 1; i < n; i++) {
      if (sm + cnt >= l) break;
      sm += cnt;
      cnt -= 2;
    }
    if (i == 1)
      ind = 1;
    else
      ind = n - (i - 2);
    if (ind == 0) ind = n;
    vector<long long> v;
    for (i = ind; i != 2; i--) {
      if (i == 0) i = n;
      if (i == 2) break;
      long long curr = 2;
      for (j = 1; j <= cnt; j++) {
        if (sm + j >= l) {
          if (j % 2 == 1)
            v.push_back(i);
          else
            v.push_back(curr++);
        } else {
          if (j % 2 == 0) curr++;
        }
      }
      sm += cnt;
      cnt -= 2;
      if (sm >= r) break;
    }
    if (sm < r) {
      for (j = 2; j <= n + 1; j++) {
        if (j > n) j = 1;
        sm++;
        if (sm >= l && sm <= r) v.push_back(j);
        if (sm >= r) break;
      }
    }
    for (i = 0; i < v.size(); i++) cout << v[i] << " ";
    cout << endl;
  }
  return 0;
}
