#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long mpow(long long a, long long b, long long p = MOD) {
  a = a % p;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % p;
    a = (a * a) % p;
    b = b >> 1LL;
  }
  return res % p;
}
const long long N = 2 * 1e5 + 2, M = 20;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    long long lol[n + 1];
    lol[1] = 1;
    for (long long i = 2; i <= n; i++) {
      lol[i] = 2 + (i - 2) * 2;
    }
    long long var = -1;
    long long s = 0;
    for (long long i = 1; i <= n; i++) {
      s += lol[i];
      if (s < l) {
      } else {
        var = i;
        s -= lol[i];
        break;
      }
    }
    long long count = r - l + 1 + 2 * n + 2;
    vector<long long> ans;
    while (count > 0) {
      if (var == 1) {
        ans.push_back(var);
        var++;
        count--;
        continue;
      }
      ans.push_back(var);
      count--;
      if (count == 0) break;
      for (long long i = 2; i < var; i++) {
        ans.push_back(i);
        count--;
        if (count == 0) break;
        ans.push_back(var);
        count--;
        if (count == 0) break;
      }
      if (count == 0) {
        break;
      }
      ans.push_back(1);
      count--;
      if (count == 0) {
        break;
      }
      var++;
    }
    for (long long i = 0; i < ans.size(); i++) {
      s++;
      if (s > r) {
        break;
      }
      if (s >= l && s <= r) {
        cout << ans[i] << " ";
      }
    }
    cout << "\n";
  }
}
