#include <bits/stdc++.h>
using namespace std;
signed main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  long long t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    long long mv = 0;
    bool b = false;
    for (long long i = 1; i <= n; i++) {
      long long nxt = i == 1 ? 1 : (i - 1) * 2;
      if (!(l > mv + nxt || r < mv + 1)) {
        b = true;
        for (long long j = max(1ll, l - mv); j <= min(r - mv, nxt); j++) {
          if (j == nxt)
            cout << "1 ";
          else if (j & 1)
            cout << i << " ";
          else
            cout << j / 2 + 1 << " ";
        }
      }
      mv += nxt;
    }
    if (b) cout << "\n";
  }
}
