#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << endl;
  err(++it, args...);
}
const int mod = 1e9 + 7;
void solve() {
  long long n, l, r;
  cin >> n >> l >> r;
  long long ind = 1, temp = 0;
  for (int i = 1; i < n + 1; i++) {
    if (temp + 2 * (n - i) < l) {
      ind = i + 1;
      temp += 2 * (n - i);
    } else
      break;
  }
  for (int i = ind; i < n; i++) {
    for (int j = i + 1; j < n + 1; j++) {
      if (temp < l && temp + 1 == l) {
        cout << i << " ";
        temp++;
        if (temp + 1 <= r) cout << j << " ", temp++;
      } else if (temp < l && temp + 2 == l) {
        cout << j << " ";
        temp += 2;
      } else if (temp + 1 >= l) {
        cout << i << " ";
        temp++;
        if (temp + 1 <= r) cout << j << " ", temp++;
      } else
        temp += 2;
      if (temp + 1 > r) break;
    }
  }
  if (r == n * (n - 1) + 1) cout << 1;
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int tt;
  cin >> tt;
  while (tt--) solve();
}
