#include <bits/stdc++.h>
#define ll long long int 
#define pb push_back
#define fi first
#define se second

#define all(x) (x).begin(),(x).end()
#define yn(x)  cout<<(x == 0 ? "NO" : "YES")<<"\n"

using namespace std;

const ll mod = 1e9+7;

ll powmod(ll a, ll b){
    assert(b>=0);
    if(b==0){return 1;}
    a = a%mod;
    ll h = powmod(a, b/2);
    h = (h*h)%mod;
    if(b%2 == 1){ h = (h*a)%mod; }

    return h;
}
ll gcd(ll a, ll b) {return __gcd(a, b);}




void solve(){
    //solve here//
    ll n, l, r; cin >> n >> l >> r;

    ll a=0, b=1;
    for(int i=1;i<n;i++){
        a += 2*(n-i)-1;
        for(ll j=max(b, l);j<=min(a, r);j++){
            ll rel = j-b+1;
            if(rel%2 == 1){
                cout << (n-i+1)%n + 1 << " "; 
            } else {
                cout << 1+rel/2 << " ";
            }
        }
        b = a+1;
    }

    a += n;
    for(ll i=max(b, l);i<=min(a, r);i++){
        ll rel = i-b+1;
        cout << rel%n+1 << " ";
    }

    cout << "\n"; return;
}


int main(){
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    
    int t = 1; cin >> t;
    
    while(t--){
        solve();
    }
}

