#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, l, r;
    cin >> n >> l >> r;
    long long int e = (n - 1);
    long long int sum = 0;
    int cnt = 0;
    int flag = 0;
    while (l > sum) {
      if (e == 0) {
        cout << 1 << endl;
        flag = 1;
        break;
      }
      sum += 2 * e;
      e--;
      cnt++;
    }
    if (flag == 1) continue;
    e++;
    sum -= 2 * e;
    long long int ee = l - sum;
    int i = cnt;
    int j = (ee / 2) + i + 1;
    for (int p = l; p < r; p++) {
      if (p % 2 != 0) {
        cout << i << " ";
      } else {
        cout << j << " ";
        j++;
      }
      if (j > n) {
        i++;
        j = i + 1;
      }
    }
    if (r == n * (n - 1) + 1) {
      cout << 1 << endl;
    } else {
      if (r % 2 == 0) {
        cout << j << endl;
      } else {
        cout << i << endl;
      }
    }
  }
}
