#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 1;
const long long inf = 1e18 + 7;
long long n, x;
long long a[N], b[N];
long long dp[N];
long long ff(long long x) { return n * (n - 1) - (x) * (x - 1); }
long long f(long long x) { return ff(n - x) + max<long long>(0, x - 1); }
long long get(long long pos, bool dbg = 0) {
  if (pos == n * (n - 1) + 1) return 1;
  if (pos >= n * (n - 1) + 1 - n + 1) return n - (n * (n - 1) + 1 - pos) + 1;
  long long l = 0, r = n;
  while (r - l > 1) {
    long long m = (l + r) / 2;
    long long ss = f(m);
    if (ss > pos)
      r = m;
    else
      l = m;
  }
  long long k = l;
  if (f(r) < pos) {
    k = r;
  }
  long long pp = pos;
  pos -= f(k);
  if (dbg) cerr << n << '\t' << pos << '\t' << k << '\t';
  if (pp % 2 != k % 2) {
    if (k == 0)
      return 1;
    else
      return n - k + 1;
  } else {
    pos += k % 2;
    pos /= 2;
    return pos + 1;
  }
}
signed main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long l, r;
    cin >> n >> l >> r;
    for (long long i = l; i <= r; i++) {
      cout << get(i) << ' ';
    }
    cout << '\n';
  }
  return 0;
}
