#include <bits/stdc++.h>
using namespace std;
int main() {
  long long test;
  scanf("%lld", &test);
  while (test--) {
    long long i, j, k, l, n, m, x, y, r;
    scanf("%lld", &n);
    scanf("%lld", &l);
    scanf("%lld", &r);
    i = l;
    vector<long long> ans;
    while (i <= r && i <= 4 * n - 5) {
      if (i <= 2 * (n - 2) + 1) {
        if (i & 1)
          ans.push_back(1);
        else {
          j = i / 2;
          ans.push_back(j + 1);
        }
      } else if (i >= 2 * (n - 2) + 2) {
        m = i - (2 * (n - 2) + 2);
        if (m < n - 1)
          ans.push_back(n - m);
        else {
          k = 2 * (n - 2) + n;
          j = 2 + (i - k);
          if (j > n) j = 1;
          ans.push_back(j);
        }
      }
      i++;
    }
    for (long long p : ans) {
      printf("%lld", p);
      printf(" ");
    }
    printf("\n");
  }
}
