#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long n) {
  a %= 1000000007;
  if (n == 1) return a;
  if (n == 0) return 1;
  if (n % 2)
    return (a * (power((a * a) % 1000000007, n / 2) % 1000000007)) % 1000000007;
  return power((a * a) % 1000000007, n / 2) % 1000000007;
}
const long long inf = (long long)1e18;
long long inverse(long long x) { return power(x, 1000000007 - 2) % 1000000007; }
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    long long tot = 0, c = 1;
    long long lo = 1, hi = n - 1;
    while (lo < hi) {
      long long mid = (lo + hi) / 2;
      if (2 * n * mid - mid * (mid - 1) >= l)
        hi = mid;
      else
        lo = mid + 1;
    }
    long long cp = c + (l - tot + 1) / 2;
    while (l <= r && l < n * (n - 1) + 1) {
      if (l % 2)
        cout << c << " ";
      else {
        cout << cp << " ";
        cp++;
      }
      l++;
      if (cp > n) c++, cp = c + 1;
    }
    if (r == n * (n - 1) + 1) cout << 1 << " ";
    cout << "\n";
  }
  return 0;
}
