#include <bits/stdc++.h>
using namespace std;
long long find(long long n, long long x) {
  long long l = 1, r = n, mid;
  while (l < r) {
    mid = l + r >> 1;
    if ((2 * n - mid - 1) * mid < x)
      l = mid + 1;
    else
      r = mid;
  }
  return mid;
}
signed main() {
  long long i, j, k, n, m, l, r, t, last, tmp;
  scanf("%lld", &t);
  while (t--) {
    scanf("%lld%lld%lld", &n, &l, &r);
    if (l == n * (n - 1) + 1) {
      printf("1 \n");
      continue;
    }
    m = find(n, l);
    last = (2 * n - m) * (m - 1);
    if (((l - last) & 1) == 0) {
      printf("%lld ", m + (l - last) / 2);
      l++;
    }
    for (tmp = m + (l - last) / 2 + 1; l + 2 <= r; l += 2, tmp++) {
      printf("%lld %lld ", m, tmp);
      if (tmp == n) {
        tmp = ++m;
      }
    }
    if (m == n) m = 1;
    if (r > l)
      printf("%lld %lld ", m, tmp);
    else
      printf("%lld ", m);
    printf("\n");
  }
  return 0;
}
