#include <bits/stdc++.h>
using namespace std;
long long mm, n, r, l, b[200002], a[200002], t;
map<long long, long long> m;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> t;
  for (long long i = 1; i < 100002; i++) m[i * (i - 1) + 1] = i;
  for (int lt = 0; lt < t; lt++) {
    cin >> n >> l >> r;
    auto itr = m.lower_bound(l);
    mm = itr->second;
    itr--;
    int ind = l - itr->second;
    itr++;
    long long lm = l, rm = r - l + 1;
    int c = 0;
    for (;;) {
      if (lm == itr->first || rm == 0) break;
      if (ind % 2 == 1) {
        cout << mm << ' ';
      } else {
        cout << ind / 2 + 1 << ' ';
      }
      rm--;
      lm++;
      ind++;
    }
    if (rm <= 0) {
      cout << '\n';
      continue;
    }
    ind = 0;
    for (;;) {
      if (rm <= 0) break;
      ind = 0;
      mm++;
      long long y = 2 * (mm - 1);
      for (;;) {
        if (y == 0 || rm <= 0) break;
        if (ind == 0) {
          cout << 1 << ' ';
          ind++;
          rm--;
          y--;
          continue;
        }
        if (ind % 2 == 1) {
          cout << mm << ' ';
        } else {
          cout << ind / 2 + 1 << ' ';
        }
        rm--;
        lm++;
        ind++;
        y--;
      }
    }
    cout << '\n';
  }
}
