#include <bits/stdc++.h>
using namespace std;
typedef long long int lld;
typedef pair<int,int> pi;
typedef pair<lld,lld> pl;
typedef pair<int,lld> pil;
typedef pair<lld,int> pli;
typedef vector<int> vit;
typedef vector<vit> vitt;
typedef vector<lld> vlt;
typedef vector<vlt> vltt;
typedef vector<pi> vpit;
typedef vector<vpit> vpitt;
typedef long double ld;
#define x first
#define y second
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz(x) (int)x.size()
#define mk(a,b) make_pair(a,b)
bool isrange(int y,int x,int n,int m){
	 if(0<=y&&y<n&&0<=x&&x<m) return true;
	 return false;
}
int dy[4] = {1,0,-1,0},dx[4]={0,1,0,-1},ddy[8] = {1,0,-1,0,1,1,-1,-1},ddx[8] = {0,1,0,-1,1,-1,1,-1};

const int MAX = 202020;
const lld mod = 1e9 + 7;
lld dp[MAX];
lld calc(lld now,lld num){
	if(num==0) return 1;
	if(num==1) return now;
	lld now2 = calc(now,num/2);
	if(num%2==0) return (now2*now2)%mod;
	return (((now2*now2)%mod)*now)%mod;
}
lld nCr(int a,int b){
	lld f1 = dp[a];
	lld f2 = (dp[b]*dp[a-b])%mod;
	return (f1*calc(f2,mod-2))%mod;
}
void solve(int tc){
	int n,l,r;
	cin >> n >> l >> r;
	lld k1 = min(abs(l-1),r-n) - 1;
	lld ans = 0;
	if(k1>0){
		if(n%2==0){
			lld t1 = nCr(n,n/2);
			t1 = (t1*k1)%mod;
			ans = t1;
		}else{
			lld t1 = nCr(n,n/2);
			t1 = (t1*2)%mod;
			t1 = (t1*k1)%mod;
			ans = t1;
		}
	}
	if(abs(l-1)<=abs(r-n)){
		int rx = r-n,tot = 0;
		for(int p=abs(l-1),k=0;k<n;k++,p++){
			if(rx<p){
				rx++;
				tot++;
			}
			if(p==0) continue;
			if(n%2==0){
				if(n-k>=(n/2)){
					lld t1 = nCr(n-k-tot,(n/2)-tot);
					ans = (ans+t1)%mod;
				}
			}else{
				if(n-k>=(n/2)){
					lld t1 = nCr(n-k-tot,(n/2)-tot);
					ans = (ans+t1)%mod;
				}
				if(n-k>=(n/2)+1){
					lld t1 = nCr(n-k-tot,(n/2)+1-tot);
					ans = (ans+t1)%mod;
				}
			}
		}
	}else{
		int rx = abs(l-1),tot=0;
		for(int p=abs(r-n),k=0;k<n;k++,p++){
			if(rx<p){
				rx++;
				tot++;
			}
			if(p==0) continue;
			if(n%2==0){
				if(n-k>=(n/2)){
					lld t1 = nCr(n-k-tot,(n/2)-tot);
					ans = (ans+t1)%mod;
				}
			}else{
				if(n-k>=(n/2)){
					lld t1 = nCr(n-k-tot,(n/2)-tot);
					ans = (ans+t1)%mod;
				}
				if(n-k>=(n/2)+1){
					lld t1 = nCr(n-k-tot,(n/2)+1-tot);
					ans = (ans+t1)%mod;
				}
			}
		}
	}
	ans = (ans%mod+mod)%mod;
	cout << ans << "\n";
}


int main(void){
	dp[0] = 1;
	for(int e=1;e<MAX;e++) dp[e] = (dp[e-1]*e)%mod;
	ios_base :: sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	
	int tc = 1;
	
		cin >> tc;
	
	for(int test_number=1;test_number<=tc;test_number++){
		solve(test_number);
	}
	return 0;
}