#include <bits/stdc++.h>
using namespace std;
const long long inf = 2e18;
const long long mod1 = 998244353;
const long long mod = 1e9 + 7;
void solve() {
  long long n, l, r;
  cin >> n >> l >> r;
  long long lo = 0, hi = n;
  while (lo <= hi) {
    long long mid = (lo + hi) / 2;
    long long now = mid * (2 * n - mid - 1);
    if (now <= l)
      lo = mid + 1;
    else
      hi = mid - 1;
  }
  long long layer = lo - 1;
  long long sum = layer * (2 * n - layer - 1);
  long long curr = l - sum;
  long long thislayer = 2 * (n - layer - 1);
  while (l <= r) {
    if (l == n * (n - 1) + 1)
      cout << 1 << " ";
    else if (curr % 2)
      cout << layer + 1 << " ";
    else
      cout << layer + 1 + curr / 2 << " ";
    curr++;
    l++;
    if (curr > thislayer) {
      curr = 1;
      layer++;
      thislayer = 2 * (n - layer - 1);
    }
  }
  cout << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) solve();
  return 0;
}
