#include <bits/stdc++.h>
using namespace std;
void solution() {
  int T;
  cin >> T;
  while (T--) {
    long long int N, R, L;
    cin >> N >> R >> L;
    long long int c = L - R + 1;
    long long int start = (N - 1) * 2;
    long long int i = 1;
    while (N * (N - 1) - (N - (i + 1)) * (N - (i + 1) - 1) <= R && i < N) {
      i++;
    }
    R -= N * (N - 1) - (N - i) * (N - i - 1);
    for (; i < N; i++) {
      for (int j = i + 1; j <= N; j++) {
        if (R <= 1) {
          cout << i << " ";
          c--;
        }
        R--;
        if (c == 0) {
          i = N;
          break;
        }
        if (R <= 1) {
          cout << j << " ";
          c--;
        }
        R--;
        if (c == 0) {
          i = N;
          break;
        }
      }
    }
    if (c > 0) cout << "1";
    cout << endl;
  }
}
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solution();
  return 0;
}
