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