#include <bits/stdc++.h>
using namespace std;
int nt, n;
long long L, R;
long long dp[100100];
int ret[3 * 100100];
void single(int x, int L, int R) {
  if (x == n) {
    cout << 1;
    return;
  }
  int m = 0;
  for (int i = x + 1; i <= n; i++) {
    ret[++m] = x;
    ret[++m] = i;
  }
  for (int i = L; i <= R; i++) cout << ret[i] << " ";
}
void gen(int x, int y, int L, int R) {
  if (x == y) {
    single(x, L, R);
    return;
  }
  single(x, L, dp[x] - dp[x - 1]);
  for (int i = x + 1; i < y; i++) single(i, 1, dp[i] - dp[i - 1]);
  single(y, 1, dp[y] - dp[y - 1]);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> nt;
  while (nt--) {
    cin >> n >> L >> R;
    dp[0] = 0;
    for (int i = 1; i < n; i++) dp[i] = 2 * (n - i) + dp[i - 1];
    dp[n] = 1 + dp[n - 1];
    int x = 0;
    int z = 0;
    for (int i = 1; i <= n; i++) {
      if (dp[i] >= L && L > dp[i - 1]) {
        x = i;
      }
      if (dp[i] >= R && R > dp[i - 1]) {
        z = i;
      }
    }
    L -= dp[x - 1];
    R -= dp[z - 1];
    gen(x, z, L, R);
    cout << "\n";
  }
  return 0;
}
