#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t, n, l, r, len;
  cin >> t;
  while (t--) {
    len = 0;
    cin >> n >> l >> r;
    for (int i = 1; i <= n; i++) {
      len += 2 * (n - i);
      if (len < l) {
        continue;
      }
      for (int j = i + 1; j <= n; j++) {
        if (l < r) {
          l++;
          cout << i << " " << j << " ";
        }
      }
    }
    cout << 1 << endl;
  }
}
