#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long l, r;
    cin >> l >> r;
    l--;
    r--;
    long long st = 0;
    long long pst = 0;
    for (long long i = 1; i <= n; i++) {
      if (pst > l) break;
      st = i;
      pst += (n - i) * 2;
    }
    if (pst > l) {
      pst -= (n - st) * 2;
      st--;
    }
    if (st == 0) st = 1;
    vector<int> ans;
    long long cnt = 0;
    for (int i = st; i <= n; i++) {
      for (int j = i + 1; j <= n; j++) {
        if (l <= pst and r >= pst) ans.push_back(i);
        pst++;
        if (l <= pst and r >= pst) ans.push_back(j);
        pst++;
        if (pst > r) break;
      }
      if (pst > r) break;
    }
    if (l <= pst and r >= pst) ans.push_back(1);
    pst++;
    for (auto x : ans) cout << x << " ";
    cout << endl;
  }
  return 0;
}
