#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int q;
  cin >> q;
  while (q--) {
    int n;
    long long l, r;
    cin >> n >> l >> r;
    long long sum = 0;
    long long now = 0;
    while (now < n - 1 && sum + 2 * (n - 1 - now) - 1 < l) {
      sum += 2 * (n - 1 - now) - 1;
      now++;
    }
    long long cur = sum + 1;
    if (now == n - 1) {
      if (cur >= l && cur <= r) {
        cout << 2 << " ";
      }
      cur++;
      vector<int> ans;
      for (int i = 3; i <= n; ++i) {
        ans.push_back(i);
      }
      ans.push_back(1);
      for (int i = 0; i < ans.size() && cur <= r; ++i, cur++) {
        if (cur >= l) cout << ans[i] << " ";
      }
      cout << endl;
      continue;
    }
    if (now == 0) {
      for (int i = 2; i < n && cur <= r; ++i, cur += 2) {
        if (cur >= l) {
          cout << 1 << " ";
        }
        if (cur + 1 >= l && cur + 1 <= r) {
          cout << i << " ";
        }
      }
      if (cur >= l && cur <= r) {
        cout << 1 << " ";
      }
      cur++;
      now = 1;
    }
    if (cur > r) continue;
    now = n + 1 - now;
    while (cur <= r) {
      for (int i = 2; i < now - 1 && cur <= r; ++i, cur += 2) {
        if (cur >= l) {
          cout << now << " ";
        }
        if (cur + 1 >= l && cur + 1 <= r) {
          cout << i << " ";
        }
      }
      if (cur >= l && cur <= r) {
        cout << now << " ";
      }
      cur++;
      now--;
      if (cur > r) break;
      if (now == 2) {
        if (cur >= l && cur <= r) {
          cout << 2 << " ";
        }
        cur++;
        vector<int> ans;
        for (int i = 3; i <= n; ++i) {
          ans.push_back(i);
        }
        ans.push_back(1);
        for (int i = 0; i < ans.size() && cur <= r; ++i, cur++) {
          if (cur >= l) {
            cout << ans[i] << " ";
          }
        }
      }
    }
    cout << endl;
  }
}
