#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int test;
  cin >> test;
  while (test--) {
    long long int n, l, r;
    cin >> n >> l >> r;
    long long int i = 1;
    for (i = 1; i <= n; i++) {
      if (i * (i - 1) < l && i * (i + 1) >= l) break;
    }
    long long int j = 1;
    for (j = 1; j <= n; j++) {
      if (j * (j - 1) < r && j * (j + 1) >= r) break;
    }
    if (l == n * (n - 1) + 1) {
      cout << "1" << endl;
      continue;
    }
    l = i * (i + 1) - (l - 1);
    if (i == j) {
      r = i * (i + 1) - r;
      vector<long long int> v;
      long long int t = i + 1, p = i;
      for (long long int x = 0; x < l; x++) {
        if (x % 2 == 0)
          v.push_back(t);
        else {
          v.push_back(p);
          p--;
        }
      }
      for (long long int y = v.size() - r - 1; y >= 0; y--) cout << v[y] << " ";
      cout << endl;
      continue;
    }
    vector<long long int> v;
    long long int t = i + 1, p = i;
    for (long long int x = 0; x < l; x++) {
      if (x % 2 == 0)
        v.push_back(t);
      else {
        v.push_back(p);
        p--;
      }
    }
    for (long long int y = v.size() - 1; y >= 0; y--) cout << v[y] << " ";
    for (long long int y = i + 1; y < j; y++) {
      for (long long int k = 1; k < y + 1; k++)
        cout << k << " " << y + 1 << " ";
    }
    if (r == n * (n - 1) + 1) {
      cout << "1" << endl;
      continue;
    }
    r -= j * (j - 1);
    long long int c = 1;
    for (long long int y = 0; y < r; y++) {
      if (y % 2 == 0) {
        cout << c << " ";
        c++;
      } else
        cout << j + 1 << " ";
    }
    cout << endl;
  }
}
