#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100257;
int T, N;
long long l, r;
long long level[MAXN];
long long prefix[MAXN];
int findNode(long long &l, int &nextMin) {
  long long ind = l - level[nextMin - 1];
  if (l == N * (N - 1) + 1) {
    return 1;
  }
  if (ind == 1) {
    return nextMin;
  } else if (ind == prefix[nextMin]) {
    ++nextMin;
    return N;
  }
  --ind;
  return ind % 2 == 0 ? nextMin : ind / 2 + nextMin + 1;
}
void solve() {
  cin >> N >> l >> r;
  level[0] = 0;
  int start = -1;
  for (int i = 1; i < N; i++) {
    prefix[i] = 1 + 2 * (N - i - 1) + 1;
    level[i] = level[i - 1] + prefix[i];
    if (level[i - 1] <= l && l < level[i]) {
      start = i;
    }
  }
  if (start == -1) {
    start = N;
  }
  while (l <= r) {
    int node = findNode(l, start);
    cout << node << " ";
    ++l;
  }
  cout << endl;
}
int main() {
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
