#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, n, i, l, r, x, j, a, b;
  cin >> t;
  while (t--) {
    cin >> n >> l >> r;
    x = sqrt(l);
    i = x * (x - 1);
    vector<long long int> ans;
    for (j = 1, a = 1, b = x + 1; j + i <= r; j += 2) {
      ans.push_back(a);
      ans.push_back(b);
      if (a + 1 == b) {
        a = 1;
        b++;
      } else
        a++;
    }
    for (j = l - i - 1; j < r - i; j++) cout << ans[j] << " ";
    cout << '\n';
    ans.clear();
  }
}
