#include <bits/stdc++.h>
using namespace std;
long long v_count(int begin) {
  if (begin == 0) {
    return 0;
  }
  return (long long)begin * (begin - 1) + 1;
}
int find_begin(long long n, long long x) {
  if (x == 1) {
    return 1;
  }
  long long begin = max(1, (int)sqrt(x) - 5);
  while (v_count(begin) < x) {
    begin++;
  }
  return begin;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    int begin_l = find_begin(n, l);
    long long i = v_count(begin_l - 1) + 1;
    int cur = begin_l;
    int other = 2;
    while (i < l) {
      i++;
      if (cur == begin_l) {
        if (other == begin_l) {
          cur = 1;
        } else {
          cur = other;
          other++;
        }
      } else {
        cur = begin_l;
      }
    }
    cout << cur << ' ';
    while (i < r) {
      i++;
      if (cur == 1) {
        begin_l++;
        cur = begin_l;
        other = 2;
      } else if (cur == begin_l) {
        if (other == begin_l) {
          cur = 1;
          other = 2;
        } else {
          cur = other;
          other++;
        }
      } else {
        cur = begin_l;
      }
      cout << cur << ' ';
    }
    cout << '\n';
  }
}
