#include <bits/stdc++.h>
using namespace std;
long long get_even(long long mid) {
  long long cnt = 2 * mid;
  long long odd = (cnt / 2) * (cnt / 2);
  long long even = cnt * (cnt + 1) / 2 - odd;
  return even;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    long long low = 1, high = 2e9;
    while (low < high) {
      long long mid = (low + high) / 2;
      long long even = get_even(mid);
      if (even + 1 >= l)
        high = mid;
      else
        low = mid + 1;
    }
    long long need = r - l + 1;
    long long cur = get_even(low - 1);
    if (l > 1) {
      cur++;
    } else {
      cout << 1 << ' ';
      need--;
    }
    l -= cur;
    r -= cur;
    long long elem = low + 1;
    long long blocks = (l - 1) / 2;
    if ((l - 1) % 2) {
      if (blocks + 2 == elem)
        cout << 1 << ' ';
      else
        cout << 2 + blocks << ' ';
      need--;
      blocks++;
    }
    while (need > 0) {
      for (long long j = 2 + blocks; j <= elem; j++) {
        cout << elem << ' ';
        need--;
        if (need == 0) break;
        if (j == elem)
          cout << 1 << ' ';
        else
          cout << j << ' ';
        need--;
        if (need == 0) break;
      }
      elem++;
      blocks = 0;
    }
    cout << '\n';
  }
  return 0;
}
