#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define xx first
#define yy second
const int BS=500;
using namespace std;
using namespace __gnu_pbds;
#define be begin()
#define rb rbegin()
#define all(v) v.begin(),v.end() 
#define rep(i,start,lim) for(long long (i)=(start);i<(lim);i++)
#define nod int node,int l,int r
#define lson node*2,l,(l+r)/2
#define rson node*2+1,(l+r)/2+1,r
typedef long long ll;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> rbTree;
const ll inf= 1e18+10;
ll mod=  1e9+7;
const ll mxn= 3e5+20;
const int N=2.5*1e7+10;
const double pi=3.14159;
#define mp make_pair
#define mp3(a,b,c) mp(a,mp(b,c))
typedef pair<int,int> pii;
typedef pair<int,pair<int,int> > piii;
typedef pair<int,pair<int,pair<int,int>>> piiii;
typedef pair<ll, int> pli;
typedef pair<ll,ll> pll;
int dx[]={0,1,0,-1,1,-1,1,-1};
int dy[]={1,0,-1,0,-1,1,1,-1};
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll n,k,m,q,x,y,p;

void print(int start, int end, int l, int r, ll cur){
    //cout<<cur<<' '<<r<<'\n';
    if(cur==k*(k-1)+1) { cout<<1; return; }
    int len=(k-1)*2-(start-1)*2;
    int cur_=start+1;
    for(int i=1;i<=len;i++){
        if(i&1) { if(cur>=l&&cur<=r) cout<<start<<' '; }
        else { if(cur>=l&&cur<=r) cout<<cur_<<' '; cur_++; }
        cur++;
        if(cur>r) return;
    }
    print(start+1,end,l,r,cur);
}
int main()
{
    // 1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5 1
    // 22, 20, 18, 16, 14, 12, 10, 8, 6 ,4 ,2,
    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    cin>>q;
    while(q--){
        cin>>k>>x>>y;
        int cnt=2;
        ll cur=2*(k-1), tot=cur;
        while(tot+cur-2<x&&cur-2>0)
            tot+=(cur-2), cnt++, cur-=2;
        if(tot<x) tot++;
        if(2*k-2>=x) tot=1, cnt=1;
        //cout<<tot<<' '<<cnt<<'\n';
        print(cnt,k,x,y,tot);
        cout<<endl;
    }
}