#include <bits/stdc++.h>
using namespace std;
long long find_block(long long n, long long l) {
  if (l == 1) {
    return 1ll;
  }
  long long l1 = 0;
  long long r1 = n;
  long long k;
  while (l1 + 1 != r1) {
    k = (l1 + r1) / 2;
    if (k * (k - 1) + 2 <= l) {
      l1 = k;
    } else {
      r1 = k;
    }
  }
  return l1 + 1;
}
long long get_pos(long long k, long long num) {
  long long pos = 0;
  if (num % 2 == 1) {
    pos = k;
  } else {
    if (num == 2 * (k - 1)) {
      pos = 1;
    } else {
      pos = (num / 2) + 1;
    }
  }
  return pos;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long t, n, l, r;
  cin >> t;
  for (int q = 0; q < t; q++) {
    cin >> n >> l >> r;
    long long k = find_block(n, l);
    long long num;
    if (k != 1) {
      num = (l - ((k - 1) * (k - 2)) - 1);
    } else {
      num = 1;
    }
    long long pos = get_pos(k, num);
    for (long long i = l; i <= r; i++) {
      cout << pos << " ";
      if (i != r) {
        if (i + 1 > (k * (k - 1) + 1)) {
          k++;
          num = 1;
          pos = k;
        } else {
          num++;
          pos = get_pos(k, num);
        }
      }
    }
    cout << endl;
  }
  return 0;
}
