#include <bits/stdc++.h>
using namespace std;
long long n, l, r;
void solve(long long cur, long long sum) {
  if (cur == n) {
    if (sum < r) printf("1 ");
    return;
  }
  bool b = 0;
  for (long long i = cur + 1; i <= n; i++) {
    if (sum > r) {
      b = 1;
      break;
    }
    sum++;
    if (sum >= l && sum <= r) {
      printf("%lld ", cur);
    }
    sum++;
    if (sum >= l && sum <= r) {
      printf("%lld ", i);
    }
  }
  if (b) return;
  solve(cur + 1, sum);
  return;
}
int main() {
  int t;
  cin >> t;
  long long sum, cur;
  while (t--) {
    sum = 0;
    cur = 1;
    scanf("%lld%lld%lld", &n, &l, &r);
    if (r == (n) * (n - 1) + 1 && l == r) {
      cout << 1 << endl;
      continue;
    }
    if (r == (n) * (n - 1) + 1 && l == r - 1) {
      cout << n << ' ' << 1 << endl;
      continue;
    }
    for (long long i = 1; i <= n + 1; i++) {
      if (sum > l) {
        sum -= (n - i + 1) * 2;
        break;
      }
      sum += (n - i) * 2;
      cur = i;
    }
    solve(cur, sum);
    cout << endl;
  }
  return 0;
}
