#include <bits/stdc++.h>
using namespace std;
const int inf = 0x7FFFFFFF;
const long long mod = (0 ? 1000000007 : 998244353);
const double eps = 1e-7;
void work() {
  long long n, l, r;
  cin >> n >> l >> r;
  vector<long long> ans;
  long long pos = l;
  if (l <= (n - 2) * 2) {
    long long f = l & 1;
    long long cnt = l / 2 + f;
    while (pos <= r && cnt < n) {
      if (f == 1) {
        ans.push_back(1);
        f = 0;
      } else {
        ans.push_back(cnt);
        cnt++;
        f = 1;
      }
      pos++;
    }
  }
  long long fl = 0;
  if (pos <= r) {
    ans.push_back(1);
    pos++;
  }
  long long now = n;
  while (pos <= r) {
    pos++;
    if (fl == 0) {
      ans.push_back(now);
      if (now == 2) {
        fl = 1;
        now++;
      } else
        now--;
    } else if (fl == 1) {
      ans.push_back(now);
      if (now == n) {
        fl = 2;
      }
      now++;
    } else {
      ans.push_back(1);
      break;
    }
  }
  for (long long i = 0; i < ans.size(); i++) {
    cout << ans[i] << ' ';
  }
  cout << endl;
}
signed main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) {
    work();
  }
  return 0;
}
