#include <bits/stdc++.h>
using namespace std;
using pi = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vpi = vector<pair<int, int>>;
const long long infl = 1LL << 60;
int mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    long long buf = 0, v = 1;
    while (buf + 2LL * (n - v) <= l && v <= n) {
      buf += 2LL * (n - v);
      v++;
    }
    long long x = l - buf - 1;
    vi ans;
    long long y = v + (x / 2) + 1;
    long long z = v;
    long long count = 0;
    if (x % 2 == 1 || x == -1) {
      count = 1;
      if (count <= r - l + 1) {
        if (x == -1)
          ans.push_back(n);
        else
          ans.push_back(y - 1);
      }
    }
    while (count < r - l + 1) {
      if (z > n || y > n) {
        z = 1;
        y = -1;
      }
      ans.push_back(z);
      count++;
      if (count == r - l + 1) break;
      ans.push_back(y);
      count++;
      if (y == n) {
        z++;
        y = z + 1;
      } else
        y++;
    }
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
