#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
  int n, l, r;
  cin >> n >> l >> r;
  ll count = 0;
  int start;
  for (start = 1; start <= n && count < l; start++) {
    int edgesHere = 2 * (n - start);
    if (count + edgesHere >= l) {
      break;
    }
    count += edgesHere;
  }
  int next = start + 1;
  bool flag = false;
  while (count < l) {
    if (flag) {
      next++;
    }
    flag ^= 1;
    count++;
  }
  bool run = false;
  for (int i = l; i <= r; i++) {
    run = true;
    if (flag)
      cout << start << ' ';
    else {
      cout << next << ' ';
      if (++next > n) {
        ++start;
        if (start == n) {
          start = 1;
        } else {
          next = start + 1;
        }
      }
    }
    flag ^= 1;
  }
  if (!run) cout << 1;
  cout << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
