#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  int i = 4;
  scanf("%d", &T);
  int n;
  long long int l, r;
  while (T--) {
    scanf("%d %lld %lld", &n, &l, &r);
    for (long long int i = l; i <= r; i++) {
      long long int gn = (long long int)ceil(sqrt(i - 0.75) + 0.5);
      long long int d = i - (gn * gn - 3 * gn + 3);
      if (d % 2)
        printf("%lld ", gn);
      else if (d / 2 == gn - 1)
        printf("1 ");
      else
        printf("%lld ", (d / 2 + 1) % gn);
    }
    printf("\n");
  }
}
