#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    vector<long long> v;
    long long a[n];
    long long m = n - 1, idx = 1, ss = (n - 2) * 2, pq = n;
    v.push_back(idx);
    a[0] = 1;
    idx += ss;
    ss -= 2;
    for (long long i = 1; i <= n - 2; i++) {
      idx++;
      v.push_back(idx);
      a[i] = pq;
      pq--;
      idx += (ss);
      ss -= 2;
    }
    long long b[n];
    b[0] = 1;
    long long qq = n;
    for (long long i = 1; i < n; i++) {
      b[i] = qq;
      qq--;
    }
    long long last = (n * (n - 1)) + 1;
    for (long long i = l; i <= r; i++) {
      if ((last - i) < n) {
        cout << b[last - i] << ' ';
        continue;
      }
      long long ind = lower_bound(v.begin(), v.end(), i) - v.begin();
      if (binary_search(v.begin(), v.end(), i) == 1) {
        cout << a[ind] << ' ';
      } else {
        ind--;
        long long val = (i - v[ind]);
        if (val % 2 == 0)
          cout << a[ind] << ' ';
        else {
          long long pp = (val / 2) + 2;
          cout << pp << ' ';
        }
      }
    }
    cout << endl;
    v.clear();
  }
  return 0;
}
