#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, l, r;
    cin >> n >> l >> r;
    long long int base = 0;
    long long int j = 0;
    if (l == n * (n - 1) + 1) {
      cout << 1 << " " << endl;
      continue;
    }
    while (j < l) {
      j += 2 * (n - base - 1);
      base++;
    }
    long long int curr;
    if (l % 2 == 1) {
      cout << base << " ";
      curr = n - (j - l) / 2 - 1;
    } else {
      cout << n - (j - l) / 2 << " ";
      curr = n - (j - l) / 2;
    }
    curr++;
    for (int i = l + 1; i <= r; i++) {
      if (i == n * (n - 1) + 1) {
        cout << 1 << " ";
        break;
      }
      if (i % 2 == 1) {
        cout << base << " ";
      } else {
        cout << curr << " ";
        curr++;
      }
      if (i == j) {
        j += 2 * (n - base - 1);
        base++;
        curr = base + 1;
      }
    }
    cout << endl;
  }
  return 0;
}
