#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
vector<int> ans;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int n;
    long long l, r;
    ans.clear();
    scanf("%d%I64d%I64d", &n, &l, &r);
    bool flag = 0;
    long long last = 0, now = 0;
    for (int i = 1; i <= n - 1; i++) {
      int pos = 0;
      now = last + 2 * (n - i - 1) + 2;
      if (flag == 0) {
        if (l <= now && l > last) {
          flag = 1;
          int del = l - last;
          for (int j = 1; j <= del; j++) {
            if (j % 2 == 1) {
              pos = i;
            } else {
              pos = j / 2 + 1;
            }
          }
          ans.push_back(pos);
          for (int j = del + 1; j <= 2 * (n - i - 1) + 2; j++) {
            if (j % 2 == 1) {
              pos = i;
            } else {
              pos = j / 2 + i;
            }
            ans.push_back(pos);
          }
        }
      } else if (flag == 1) {
        if (r > last && r <= now) {
          flag = 0;
          int del = r - last;
          for (int j = 1; j <= del; j++) {
            if (j % 2 == 1) {
              pos = i;
            } else {
              pos = j / 2 + i;
            }
            ans.push_back(pos);
          }
          for (int j = del + 1; j <= 2 * (n - i - 1) + 2; j++) {
            if (j % 2 == 1) {
              pos = i;
            } else {
              pos = j / 2 + i;
            }
          }
        } else {
          for (int j = 1; j <= 2 * (n - i - 1) + 2; j++) {
            if (j % 2 == 1) {
              pos = i;
            } else {
              pos = j / 2 + i;
            }
            ans.push_back(pos);
          }
        }
      }
      last = now;
    }
    for (int i = 0; i < ans.size(); i++) printf("%d ", ans[i]);
    if (r == 1ll * n * (n - 1) + 1) printf("%d ", 1);
    puts("");
  }
}
