#include <bits/stdc++.h>
using namespace std;
long long int oo = numeric_limits<long long int>::max();
long long int MOD = 1e9 + 7;
long long int comp(long long int n) { return 1LL + (n * (n + 1LL)); }
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  int t;
  cin >> t;
  while (t--) {
    long long int n, l, r;
    cin >> n >> l >> r;
    long long int i = 1;
    while (i <= n && comp(i) < l) i++;
    long long int idx = i == 1 ? 1 : comp(i - 1);
    if (l == 1) {
      cout << 1 << " ";
    }
    for (; i <= n; i++) {
      long long int ii = i + 1;
      for (long long int j = 0; j < 2 * 1LL * i; j++) {
        long long int nm;
        if (j % 2 == 0) {
          nm = ii;
        } else if (j + 1LL == 2 * 1LL * i) {
          nm = 1;
        } else {
          nm = j / 2 + 2;
        }
        idx++;
        if (idx >= l && idx <= r) {
          cout << nm << " ";
        } else if (idx > r) {
          goto end;
        }
      }
    }
    cout << endl;
  end:
    continue;
  }
}
