#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tc, n, l, r;
  cin >> tc;
  for (long long i = 0; i < tc; i++) {
    cin >> n >> l >> r;
    if (l == (((n * (n - 1))) + 1)) {
      cout << "1";
      continue;
    }
    long long ind = 0;
    long long add = (n - 1) * 2;
    long long sum = 1;
    while (1) {
      if ((add + ind) >= l) {
        break;
      } else {
        ind += add;
        add -= 2;
        sum++;
      }
    }
    ind++;
    add = sum;
    while (ind < l) {
      if (ind == l) {
        break;
      } else {
        if (ind % 2 == 0) {
          add++;
        }
        ind++;
      }
    }
    long long ind1 = l;
    if (l % 2 == 0) add++;
    while (ind1 <= r) {
      if (sum == n) {
        cout << "1";
        break;
      }
      while (add <= n) {
        if (ind1 % 2 == 0) {
          cout << add << " ";
          ind1++;
          if (add == n) break;
        } else {
          cout << sum << " ";
          ind1++;
          add++;
        }
        if (ind1 > r) break;
        if (add > n) break;
      }
      if (ind1 > r) break;
      sum++;
      add = sum;
    }
  }
}
