/* 1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5 1 */ #include<bits/stdc++.h> using namespace std; #define ll long long #define N 200005 long long n,l,r,L[N],R[N],a[N]; void calc(int i,ll l,ll r){//打印第i段区间[l,r]元素 vector<ll>ans; ans.push_back(0); for(ll j=i+1;j<=n;j++){ ans.push_back(i); ans.push_back(j); } if(i==n)ans.push_back(1); for(ll j=l;j<=r;j++) printf("%lld ",ans[j]); } int main(){ int t;cin>>t; while(t--){ cin>>n>>l>>r; a[n]=1;a[n-1]=2; for(int i=n-2;i>=1;i--)a[i]=a[i+1]+2; for(int i=1;i<=n;i++)L[i]=R[i-1]+1,R[i]=L[i]+a[i]-1; for(int i=1;i<=n;i++){ if(l<=R[i] && r>=L[i]){ calc(i,max(l,L[i])-R[i-1],min(r,R[i])-R[i-1]); } } puts(""); } }