#include <bits/stdc++.h>
using namespace std;
vector<long long> ans;
int main() {
  int tests = 1;
  int n;
  long long l, r;
  scanf("%d", &tests);
  while (tests--) {
    ans.clear();
    scanf("%d%lld%lld", &n, &l, &r);
    long long s = sqrt(l - 1), t = sqrt(r - 1);
    while (s * (s - 1) <= l - 1) s++;
    s--;
    while (t * (t - 1) <= r - 1) t++;
    ans.push_back(1);
    for (long long i = s; i < t; ++i) {
      for (long long j = 2; j <= i; ++j) ans.push_back(i + 1), ans.push_back(j);
      ans.push_back(i + 1);
      ans.push_back(1);
    }
    r -= s * (s - 1) + 1, l -= s * (s - 1) + 1;
    for (int i = 0; i < (int)ans.size(); ++i) {
      if (i >= l && i <= r) printf("%lld ", ans[i]);
    }
    puts("");
  }
}
