#include <bits/stdc++.h>
using namespace std;
void find(const long long &n, long long l, long long r) {
  long long i = 0;
  int v = 1;
  while (true) {
    if (i + 2 * (n - v) > l) {
      break;
    }
    i += 2 * (n - v);
    v++;
    if (v == n) {
      break;
    }
  }
  int cur = v, next = v + 1;
  i++;
  bool b = true;
  while (i < l) {
    b = false;
    if (i + 1 == n) {
      break;
    }
    i++;
    b = true;
    if (next == n) {
      cur++;
      next = cur + 1;
    } else {
      next++;
    }
    if (i + 1 == n) {
      break;
    }
  }
  if (cur == n) {
    cout << 1 << endl;
    return;
  }
  vector<int> res;
  while (i <= r) {
    if (b) {
      res.push_back(cur);
      b = false;
      i++;
      continue;
    }
    res.push_back(next);
    if (next == n) {
      if (cur == n - 1) {
        cur = 1;
      } else {
        cur++;
        next = cur + 1;
      }
    } else {
      next++;
    }
    i++;
    b = true;
  }
  for (auto &x : res) {
    cout << x << ' ';
  }
  cout << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    find(n, l, r);
  }
  cin.ignore(2);
  return 0;
}
