#include <bits/stdc++.h>
using namespace std;
void out(const vector<int>& arr) {
  for (auto i : arr) {
    cout << i << " ";
  }
  cout << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  for (int t1 = 0; t1 < t; t1++) {
    int n;
    long long l, r;
    cin >> n >> l >> r;
    long long pos = 0;
    long long delta = 0;
    int i = 1;
    while (pos < l) {
      if (n - i > 0) {
        delta = (long long)((long long)n - i) * 2;
      } else
        delta = 1;
      pos += delta;
      i++;
    }
    i--;
    long long realpos = pos - delta + 1;
    int j = i + 1;
    long long value = r - l + 1;
    while (realpos < l) {
      realpos += 2;
      j++;
    }
    bool flag = false;
    if (realpos != l) {
      realpos -= 2;
      j--;
      flag = true;
    }
    while (value > 0) {
      if (i == n) {
        cout << 1;
        break;
      }
      for (; j <= n; j++) {
        if (!flag) {
          cout << i << " ";
          value--;
        }
        flag = false;
        realpos++;
        if (value <= 0) break;
        cout << j << " ";
        value--;
        realpos++;
      }
      i++;
      j = i + 1;
    }
    cout << "\n";
  }
  return 0;
}
