#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const double PI = acos(-1.);
const int N = 2e6 + 6;
long long l, r, x;
vector<long long> res;
void gen(long long n) {
  if (x > r) return;
  if (x >= l && x <= r) res.push_back(1);
  x++;
  for (long long i = 2; i < n; i++) {
    if (x > r) return;
    if (x >= l && x <= r) res.push_back(n);
    x++;
    if (x >= l && x <= r) res.push_back(i);
    x++;
  }
  if (x >= l && x <= r) res.push_back(n);
  x++;
}
int main() {
  ios_base::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    res.clear();
    long long n;
    cin >> n;
    cin >> l >> r;
    long long y = n;
    for (; y * (y - 1) >= l; y--)
      ;
    y = max(1LL, y - 1);
    x = y * (y - 1) + 1;
    for (long long i = y + 1; i <= n; i++) gen(i);
    if (x <= r) res.push_back(1);
    x++;
    for (auto x : res) cout << x << " ";
    cout << "\n";
  }
  return 0;
}
