#include <bits/stdc++.h>
using namespace std;
long long a[300004], b[300004], v[300004];
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    long long n, l, r, cn;
    cin >> n >> l >> r;
    if (l == n * (n - 1) + 1) {
      cout << 1 << "\n";
      continue;
    }
    cn = n - 1;
    while (cn > 0 && l >= 2 * cn) {
      l -= 2 * cn;
      r -= 2 * cn;
      cn--;
    }
    int pr = n - cn, cnt = n - cn + 1;
    while (l > 1) {
      l -= 2;
      r -= 2;
      cnt++;
    }
    if (l == 0) {
      if (cnt == pr + 1) {
        cout << n << " ";
      } else {
        cout << cnt - 1 << " ";
      }
    }
    for (int i = 1; i <= (r - l + 1) / 2; i++) {
      cout << pr << " " << cnt << " ";
      if (cnt == n) {
        cnt = pr + 2;
        pr++;
      } else {
        cnt++;
      }
    }
    if (r == n * (n - 1) + 1) {
      cout << 1;
    } else if ((r - l + 1) % 2 == 1) {
      cout << pr;
    }
    cout << "\n";
  }
  return 0;
}
