#include <bits/stdc++.h>
using i64 = long long;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    i64 l, r;
    scanf("%d%lld%lld", &n, &l, &r);
    --l;
    auto ll = l / 2;
    i64 s = 0;
    int k = 1;
    while (s + n - k < ll) s += n - k;
    int sc = ll - s + k + 1;
    if (l % 2) {
      printf("%d ", sc);
      ++l;
      if (sc == n) {
        ++k;
        sc = k + 1;
      } else {
        ++sc;
      }
    }
    while (l < r) {
      if (l == n * (n - 1)) {
        printf("1");
        break;
      }
      printf("%d ", l % 2 ? sc : k);
      ++l;
      if (l % 2) continue;
      if (sc == n) {
        ++k;
        sc = k + 1;
      } else {
        ++sc;
      }
    }
    printf("\n");
  }
  return 0;
}
