#include <bits/stdc++.h>
using namespace std;
void upgrade() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); }
long long nums[100100];
long long func(long long a) { return a * (a - 1); }
int main() {
  upgrade();
  int t;
  cin >> t;
  for (int zzz = 0; zzz < t; zzz++) {
    long long n, l, r;
    cin >> n >> l >> r;
    nums[0] = 0;
    if (n == 2) {
      int a[4] = {0, 1, 2, 1};
      for (int i = l; i < r + 1; i++) {
        cout << a[i] << ' ';
      }
      cout << '\n';
      continue;
    }
    long long cnt = 2 * n - 3;
    long long st;
    long long ind, mod, head, f, cur;
    bool c = 1;
    for (int i = 1; i < n + 10; i++) {
      nums[i] = nums[i - 1] + cnt;
      cnt -= 2;
      if (nums[i] >= l) {
        st = nums[i - 1];
        ind = (long long)i;
        break;
      }
      if (cnt < 0) {
        c = 0;
        f = l - nums[i - 1];
        break;
      }
    }
    if (c) {
      mod = (l - st) % 2;
      head = (ind == 1) ? 1 : (n + 2 - ind);
      f = mod;
      cur = (l - st - 1) / 2 + 2;
    }
    for (int i = 0; i < r - l + 1; i++) {
      if (f == 1) {
        cout << head << ' ';
        if (head == 1 && cur == n) {
          head = n;
          cur = 2;
        } else if (head == 3) {
          f = 2;
        } else if (head != 1 && cur == head - 1) {
          head--;
          cur = 2;
        } else {
          f = 0;
        }
      } else if (f == 0) {
        cout << cur << ' ';
        cur++;
        f = 1;
      } else {
        if (f != n + 1)
          cout << f << ' ';
        else
          cout << 1 << ' ';
        f++;
      }
    }
    cout << '\n';
  }
}
