#include <bits/stdc++.h>
using namespace std;
long long x, y, e;
void solve(long long n, long long l) {
  long long i, sum = 0;
  for (i = 1; i < n; i++) {
    if (l <= sum + 2 * (n - i))
      break;
    else
      sum += 2 * (n - i);
  }
  l -= sum;
  x = i;
  if (l % 2) {
    e = 1;
    y = i;
    return;
  }
  long long ans = i;
  for (i = 1; i <= l / 2; i++) ans++;
  y = ans;
  e = 2;
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t, n, l, r, i, k, a, b;
  cin >> t;
  while (t--) {
    cin >> n >> l >> r;
    e = 0;
    long long oh_bhai = n * (n - 1) + 1;
    if (oh_bhai == l)
      cout << "1\n";
    else {
      solve(n, l);
      if (e == 1) {
        long long f = 0;
        for (i = l; i <= r; i++) {
          if (i == oh_bhai)
            cout << "1";
          else if (f == 0) {
            f = 1;
            cout << x << " ";
          } else {
            f = 0;
            cout << y << " ";
            y++;
            if (y == n + 1) {
              x += 1;
              y = x + 1;
            }
          }
        }
      } else {
        long long f = 1;
        for (i = l; i <= r; i++) {
          if (i == oh_bhai)
            cout << "1";
          else if (f == 0) {
            f = 1;
            cout << x << " ";
          } else {
            f = 0;
            cout << y << " ";
            y++;
            if (y == n + 1) {
              ++x;
              y = x + 1;
            }
          }
        }
      }
    }
    cout << "\n";
  }
}
