#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 50;
long long a[600000 + 60], b[600000 + 60];
long long dp[600000 + 60];
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    if (n == 1) {
      cout << 1 << "\n";
    } else if (n == 2) {
      string s = "121";
      for (long long i = l - 1; i < r; i++) {
        cout << s[i] << " ";
      }
      cout << "\n";
    } else {
      long long up = (n - 1LL) * 2LL;
      long long sum = up;
      long long st = 1;
      long long lee = 1, rii = 2LL;
      while (lee < rii) {
        long long mid = (lee + rii) / 2LL;
        if ((mid * ((2LL * up) + (mid - 1LL) * 2LL)) / 2LL < l) {
          lee = mid + 1LL;
        } else {
          rii = mid;
        }
      }
      st = lee;
      long long mid = lee;
      sum = (mid * ((2LL * up) + (mid - 1LL) * 2LL)) / 2LL;
      long long pre = ((mid - 1LL) * ((2LL * up) + (mid - 2LL) * 2LL)) / 2LL;
      long long val = st + (l - (sum - up)) / 2LL;
      for (long long i = l; i <= r; i++) {
        if (i == n * (n - 1LL) + 1LL) {
          cout << 1 << " ";
          break;
        }
        if (i % 2LL == 1LL) {
          cout << st << " ";
          val++;
        } else {
          cout << val << " ";
          if (val == n) {
            st++;
            val = st;
          }
        }
      }
      cout << "\n";
    }
  }
  return 0;
}
