#include <bits/stdc++.h>
using namespace std;
void upgrade() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); }
long long func(long long a) { return a * (a - 1); }
int main() {
  upgrade();
  int t;
  cin >> t;
  for (int zzz = 0; zzz < t; zzz++) {
    long long n, l, r;
    cin >> n >> l >> r;
    long long h = 2;
    while (l > func(h) + 1) {
      h++;
    }
    long long a = l - func(h - 1) - 1;
    long long h2;
    if (a == 2 * h - 2) {
      h2 = 1;
    } else {
      h2 = a / 2 + 1;
    }
    long long f = a % 2;
    if (l == 1) {
      h = 1, h2 = 1;
      f = 0;
    }
    for (int i = 0; i < r - l + 1; i++) {
      if (f) {
        cout << h << ' ';
        if (h == 2) h2 = 1;
      } else {
        cout << h2 << ' ';
        if (h2 == 1) {
          h++;
          h2 = 2;
        } else if (h2 == h - 1) {
          h2 = 1;
        } else {
          h2++;
        }
      }
      f = ~f;
    }
    cout << '\n';
  }
}
