#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, k, n, t, m, l, r;
  cin >> t;
  while (t--) {
    cin >> n >> l >> r;
    r = r - l + 1;
    if ((l - 1) == n * (n - 1)) {
      cout << 1 << endl;
    } else {
      for (i = 1; i <= n - 1; i++) {
        if ((n - i) * 2 < l)
          l = l - (n - i) * 2;
        else {
          long long x = (l - 1) / 2;
          long long p = i + x;
          x = x * 2;
          if (l - x == 1) {
            while (r--) {
              cout << i << " ";
              p++;
              if (r > 0) {
                cout << p << " ";
                r--;
              }
              if (p == n) {
                i++;
                p = i;
              }
              if (i >= n && r > 0) {
                cout << 1;
                break;
              }
            }
          } else {
            while (r--) {
              p++;
              cout << p << " ";
              if (r > 0) {
                cout << i << " ";
                r--;
              }
              if (p == n) {
                i++;
                p = i;
              }
              if (i >= n && r > 0) {
                cout << 1 << " ";
                break;
              }
            }
          }
          cout << endl;
          break;
        }
      }
    }
  }
}
