#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0), ios_base::sync_with_stdio(0);
  int T;
  int i, j, p, q;
  cin >> T;
  long long int cnt2, N, L, R, cnt, oth;
  bool parid;
  for (int t = 0; t < T; t++) {
    cin >> N >> L >> R;
    cnt = 0;
    for (i = 1; i < N; i++) {
      if (L <= cnt + 2 * (N - i)) {
        parid = (L - cnt) % 2;
        oth = (L - cnt + 1) / 2 + i;
        for (j = L; j <= R - 1; j++) {
          if (!parid) {
            cout << oth << " ";
            oth++;
          } else {
            cout << i << " ";
          }
          parid = !parid;
          if (cnt + 2 * (N - i) == j) {
            cnt += 2 * (N - i), i++;
            parid = (L - cnt) % 2;
            oth = (L - cnt + 1) / 2 + i;
          }
        }
        if (R <= N * (N - 1)) {
          if ((j - cnt) % 2 == 0)
            cnt2 = (j - cnt) / 2 + i;
          else
            cnt2 = i;
          cout << cnt2 << " ";
        }
        break;
      }
      cnt += 2 * (N - i);
      if (R < L) break;
    }
    if (R == N * (N - 1) + 1) {
      cout << 1;
    }
    cout << "\n";
  }
}
