#include <bits/stdc++.h>
#define N 200005
#define M 1000000007
using namespace std;
using ll = long long;

ll fact[N];

ll fexp(ll a, ll b) {
	ll res = 1;
	for (; b > 0; b >>= 1) {
		if (b&1) res = res * a % M;
		a = a * a % M;
	}
	return res;
}

ll nck(ll n, ll k) {
	// cout << n << ' ' << k << endl;
	ll num = fact[n];
	ll den = fact[k] * fact[n-k] % M;
	// cout << num * fexp(den, M-2) % M << endl;
	return num * fexp(den, M-2) % M;
}

void solve() {
	ll n, l, r; cin >> n >> l >> r;
	ll k = min(1-l, r-n);
	ll ans = k * (n%2 + 1) * nck(n, n/2) % M;

	for (ll x=k+1; x<k+n; x++) {
		// cout << x << " ------" << endl;
		ll pos = max(0ll, (l+x) - 1);
		ll neg = max(0ll, n - (r-x));
		ll both = n - pos - neg;

		if (both < 0) break;

		if (n%2 == 0) {
			if (pos <= n/2 && neg <= n/2) ans += nck(both, n/2 - pos);
		} else {
			if (pos <= n/2 && neg <= n/2+1) ans += nck(both, n/2 - pos);
			if (pos <= n/2+1 && neg <= n/2) ans += nck(both, n/2 - neg);
		}

		ans %= M;
	}

	cout << ans << endl;
}

int main() {
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	
	fact[0] = 1;
	for (int i=1; i<N; i++) {
		fact[i] = fact[i-1] * i % M;
	}

	int t; cin>>t;
	while (t--) solve();
}
