Let's call an integer array a_1, a_2, ..., a_n good if a_i ≠ i for each i.

Let F(a) be the number of pairs (i, j) (1 ≤ i < j ≤ n) such that a_i + a_j = i + j.

Let's say that an array a_1, a_2, ..., a_n is excellent if: 

  * a is good; 
  * l ≤ a_i ≤ r for each i; 
  * F(a) is the maximum possible among all good arrays of size n. 



Given n, l and r, calculate the number of excellent arrays modulo 10^9 + 7.

Input

The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases. 

The first and only line of each test case contains three integers n, l, and r (2 ≤ n ≤ 2 ⋅ 10^5; -10^9 ≤ l ≤ 1; n ≤ r ≤ 10^9).

It's guaranteed that the sum of n doesn't exceed 2 ⋅ 10^5.

Output

For each test case, print the number of excellent arrays modulo 10^9 + 7.

Example

Input


4
3 0 3
4 -3 5
42 -33 55
69 -42 146


Output


4
10
143922563
698570404

Note

In the first test case, it can be proven that the maximum F(a) among all good arrays a is equal to 2. The excellent arrays are: 

  1. [2, 1, 2]; 
  2. [0, 3, 2]; 
  3. [2, 3, 2]; 
  4. [3, 0, 1]. 
#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define ins insert
#define pq priority_queue
#define minele min_element
#define maxele max_element
#define lb lower_bound //first pos >= val
#define ub upper_bound // first pos > val
#define cnt_bit __builtin_popcount
#define debug(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")
using namespace std;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;


int d4x[4] = {1, 0, -1, 0}; int d4y[4] = {0, 1, 0, -1};
int d8x[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int d8y[8] = {1, 1, 0, -1, -1, -1, 0, 1};

const ll oo = 1e18;
const ll maxN = 1e6;
const ll MOD = 1e9 + 7;

/* Author : Le Ngoc Bao Anh, 10A5, LQD High School for Gifted Student */

void maximize(int &a, int b) {
    a = max(a, b);
}

void minimize(int &a, int b) {
    a = min(a, b);
}

ll Power(ll a, ll b) {
	if(b == 0) return 1;
	if(b == 1) return a;
	ll T = Power(a, b / 2);
	if(b % 2) return (T * T % MOD * a % MOD);
	return (T * T % MOD);
}

ll f[maxN], invf[maxN];

void solve() {
	ll n, L, R;
	cin >> n >> L >> R;
	ll x = min(1 - L, R - n);

	auto C = [&](int n, int k) -> ll {
		if(n < k) return 0;
		return (f[n] * invf[k] % MOD * invf[n - k] % MOD);
	};

	ll ans = 0;
	if(n % 2 == 0) {
		ans = x * C(n, n / 2) % MOD; 
	} else {
		ans = ((x * C(n, n / 2) % MOD) * 2) % MOD;
	}

	for(int i = x + 1; ; i++) {
		ll lo = max(1ll, L + i), hi = min(n, R - i);
		if(lo > n || hi < 1) break;
		if(hi + 1 == lo) {
			int k = n / 2;
			if(n % 2 == 0) {
				if(lo - 1 == k && n - hi == k) ans++;
			} else {
				if(lo - 1 == k && n - hi == k + 1) ans++;
				if(lo - 1 == k + 1 && n - hi == k) ans++;
			}
			continue;
		}
		if(n % 2 == 0) {
			int k = n / 2;
			int a = lo - 1, b = n - hi;
			if(a > k || b > k) break;
			int len = hi - lo + 1;
			int x = k - a;
			ans = (ans + C(len, x)) % MOD;
		} else {
			int k = n / 2;
			int a = lo - 1, b = n - hi;
			if(a <= k && (b <= (k + 1)))  {
				int len = hi - lo + 1;
				int x = k - a;
				ans = (ans + C(len, x)) % MOD;
			}

			if((a <= (k + 1)) && b <= k) {
				int len = hi - lo + 1;
				int x = k + 1 - a;
				ans = (ans + C(len, x)) % MOD;
			}
		}
	}

	cout << ans << endl;
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #else 
    //online
    #endif

    int n = 2e5 + 10;
    f[0] = 1;
	for(int i = 1; i <= n; i++) f[i] = (f[i - 1] * i) % MOD;
	invf[n] = Power(f[n], MOD - 2);
	for(int i = n - 1; i >= 0; i--) {
		invf[i] = (invf[i + 1] * (i + 1)) % MOD;
	}

    int tc = 1, ddd = 0;
    cin >> tc;
    while(tc--) {
        //ddd++;
        //cout << "Case #" << ddd << ": ";
        solve();
    }
}