#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
const long long inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    long long n, l, r;
    cin >> n >> l >> r;
    long long num = 0;
    long long cnt = r - l + 1;
    for (int i = 1; i <= n && cnt; ++i) {
      if (num + 2 * n - 2 * i < l) {
        num += 2 * n - 2 * i;
      } else {
        if ((l - num) % 2 == 0) {
          cnt--;
          cout << (l - num) / 2 + i << ' ';
        }
        int temp = i;
        if (l - num - 2 * n + 2 * i == 0) {
          ++temp;
        }
        for (int j = temp; j < n && cnt; ++j) {
          for (int k = (j == i ? (l - num + 1) / 2 + i : j + 1); k <= n && cnt;
               ++k) {
            cout << j << ' ';
            cnt--;
            if (cnt == 0) break;
            cout << k << ' ';
            cnt--;
            if (cnt == 0) break;
          }
        }
        break;
      }
    }
    if (cnt) cout << "1";
    cout << endl;
  }
  return 0;
}
