#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 10;
long long t;
vector<long long> ans;
long long n;
long long l, r;
void in();
void solve();
void outfor(long long v);
void out();
int main() {
  ios::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  cin >> t;
  for (long long i = 0; i < t; i++) {
    in();
    solve();
    out();
  }
}
void in() { cin >> n >> l >> r; }
void solve() {
  for (long long i = 2; i <= n; i++) outfor(i);
  if (r == n * (n - 1) + 1) ans.push_back(1);
}
void outfor(long long v) {
  long long edgegone = (v - 1) * (v - 2);
  long long edgegoneafter = v * (v - 1);
  if (r <= edgegone || edgegoneafter < l) return;
  if (l <= edgegone + 1) ans.push_back(1);
  edgegone++;
  for (long long i = 2; i < v; i++) {
    if (r <= edgegone) return;
    if (l <= edgegone + 1) ans.push_back(v);
    edgegone++;
    if (r <= edgegone) return;
    if (l <= edgegone + 1) ans.push_back(i);
    edgegone++;
  }
  if (r <= edgegone) return;
  if (l <= edgegone + 1) ans.push_back(v);
}
void out() {
  for (auto i : ans) cout << i << ' ';
  cout << '\n';
  ans.clear();
}
