#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  size_t T;
  cin >> T;
  while (T--) {
    int n, l, r;
    cin >> n >> l >> r;
    int t = 1;
    int k = 1;
    while (k < l && t != n) {
      k += 2 * (n - t++);
    }
    if (k < l) {
      cout << 1 << endl;
      continue;
    }
    if (k > l) {
      k -= 2 * (n - --t);
    }
    int difference = l - k;
    int c = difference / 2 + t + 1;
    if (difference % 2 == 0) {
      int current = l;
      while (current <= r) {
        cout << t << " ";
        ++current;
        if (current <= r) {
          cout << c++ << " ";
          ++current;
          if (c > n) {
            c = ++t + 1;
            if (t == n) {
              if (current <= r) cout << 1;
              break;
            }
          }
        }
      }
    } else {
      cout << c << " ";
      ++l;
      difference = l - k;
      c = difference / 2 + t + 1;
      if (c > n) {
        c = ++t + 1;
        if (t == n) {
          cout << 1 << endl;
          break;
        }
      }
      int current = l;
      while (current <= r) {
        cout << t << " ";
        ++current;
        if (current <= r) {
          cout << c++ << " ";
          ++current;
          if (c > n) {
            ++t;
            c = t + 1;
            if (t == n) {
              if (current <= r) cout << 1;
              break;
            }
          }
        }
      }
    }
    cout << endl;
  }
}
