#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1010;
long long T, n, l, r;
signed main() {
  scanf("%I64d", &T);
  while (T--) {
    scanf("%I64d%I64d%I64d", &n, &l, &r);
    long long sum = 0;
    for (long long i = (1), _end_ = (n - 1); i <= _end_; ++i) {
      if (sum + 2 * (n - i) <= l) {
        sum += 2 * (n - i);
        continue;
      }
      long long pos = i + 1;
      while (sum + 2 < l) {
        sum += 2;
        ++pos;
      }
      if (sum + 2 == l) {
        ++sum;
        ++pos;
        printf("%I64d ", pos);
      }
      while (sum <= r && pos <= n) {
        printf("%I64d %I64d ", i, pos);
        ++pos;
        sum += 2;
      }
      for (long long j = (i + 1), _end_ = (n - 1); j <= _end_; ++j) {
        while (sum + 2 * (n - i) <= r) {
          for (long long k = (j + 1), _end_ = (n); k <= _end_; ++k)
            printf("%I64d %I64d ", j, k);
          sum += 2 * (n - i);
        }
        pos = j + 1;
        while (sum + 2 <= r) {
          printf("%I64d %I64d ", j, pos);
          sum += 2;
          ++pos;
        }
        if (sum + 1 == r) printf("%I64d ", j);
        break;
      }
      break;
    }
    if (r == n * (n - 1) + 1) printf("1 ");
    puts("");
  }
  return 0;
}
