#include <bits/stdc++.h>
using namespace std;
bool visited[100][100] = {};
bool found = false;
int ans[100 * 100];
int n, totalEdge;
void test(int len, int node) {
  ans[len] = node;
  if (len == totalEdge) {
    found = true;
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (i == node) continue;
    if (visited[node][i]) continue;
    visited[node][i] = true;
    test(len + 1, i);
    if (found) return;
    visited[node][i] = false;
  }
}
void findLvl(long long num, long long n, long long &lvl, long long &x) {
  long long ans = 0, left = 0, right = n - 1;
  const long long M = n * (n - 1) / 2;
  long long call;
  while (left <= right) {
    long long mid = (left + right) >> 1;
    long long cal = M - (mid * (mid + 1)) / 2;
    if (cal <= num)
      ans = mid, call = cal, right = mid - 1;
    else
      left = mid + 1;
  }
  lvl = n - ans;
  x = lvl + num - call;
  if (num == call) lvl--, x = lvl + 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  cin >> t;
  for (long long iiii = 0; iiii < t; iiii++) {
    long long n, l, r;
    cin >> n >> l >> r;
    bool end = false;
    if (r > n * (n - 1)) end = true, r--;
    long long cycL = (l >> 1) + (l & 1), cycR = (r >> 1) + (r & 1);
    long long lvl, x;
    findLvl(cycL, n, lvl, x);
    for (long long i = cycL; i <= cycR; i++) {
      if (i == cycL && (l & 1) == 0)
        cout << x << ' ';
      else if (i == cycR & (r & 1))
        cout << lvl << ' ';
      else {
        cout << lvl << ' ' << x << ' ';
      }
      x++;
      if (x > n) lvl++, x = lvl + 1;
    }
    if (end) cout << 1;
    cout << '\n';
  }
}
