#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    list<int> ans;
    long long k = 1, cur = 0;
    while (cur + 2 * (n - k) <= l && k < n - 1) {
      cur += 2 * (n - k);
      k++;
    }
    int m = k;
    for (long long i = cur + 1; i <= r; ++i) {
      if (i % 2) {
        if (m == n) {
          k++;
          m = k;
        }
        if (k == n) k = 1;
        ans.push_back(k);
      } else {
        m++;
        ans.push_back(m);
      }
    }
    for (long long i = 0; i < l - cur - 1; ++i) ans.pop_front();
    for (auto i : ans) cout << i << " ";
    cout << endl;
  }
  return 0;
}
