#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, l, r;
  cin >> n >> l >> r;
  long long end = n * (n - 1);
  end++;
  long long index = l / 2;
  index++;
  long long before = 0;
  pair<long long, long long> state;
  for (int i = 1; i < n; i++) {
    if (index - before <= n - i) {
      state = make_pair(i, i + index - before);
      break;
    } else {
      before += n - i;
    }
  }
  for (long long i = l; i <= r; i++) {
    if (i == end)
      cout << 1 << " ";
    else {
      if (i % 2 == 1)
        cout << state.first << " ";
      else {
        cout << state.second << " ";
        if (state.second == n) {
          state.first++;
          state.second == state.first + 1;
        } else {
          state.second++;
        }
      }
    }
  }
  cout << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) solve();
}
