#include <bits/stdc++.h>
using namespace std;
long long INF = LLONG_MAX;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    scanf("%lld %lld %lld", &n, &l, &r);
    long long len = r - l + 1;
    long long s = 1;
    long long k = 0;
    if (l - s > 0) {
      l -= s;
      k++;
    }
    while (l - 2 * s > 0) {
      l -= 2 * s;
      k++;
      s++;
    }
    long long curr_v = k + 1;
    long long iter = 1;
    long long pos = l;
    long long otr = (curr_v - 1) * 2;
    if (!otr) otr++;
    while (iter <= len) {
      if (pos % 2)
        printf("%lld ", curr_v);
      else {
        if (pos == otr)
          printf("1 ");
        else
          printf("%lld ", pos / 2 + 1);
      }
      if (pos == otr) {
        curr_v++;
        otr = (curr_v - 1) * 2;
        pos = 1;
      } else {
        pos++;
      }
      iter++;
    }
    printf("\n");
  }
  return 0;
}
