#include <bits/stdc++.h>
using namespace std;
int t;
long long n, l, r, c, o = 1, two = 2, cc;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(0);
  cin >> t;
  while (t--) {
    cin >> n >> l >> r;
    c = (n - o) * two;
    long long d = r - l + o;
    cc = 1;
    l--;
    while (l >= c) {
      l -= c;
      c -= two;
      cc++;
      if (c == 0 && l == 0) break;
    }
    for (cc; cc < n && d > 0; cc++) {
      for (int j = 0, id = cc; j < c && d > 0; j++) {
        if (j % 2) {
          id++;
        }
        if (j < l) continue;
        if (j % 2)
          cout << id << " ";
        else
          cout << cc << " ";
        d--;
      }
      l = 0;
    }
    if (d) cout << 1;
    cout << "\n";
  }
}
