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 <iostream>
#include <algorithm>

#define int long long

using namespace std;

const int M = 1e9 + 7;

long long fac[200001], ifac[200001];

long long powerMod(long long a, long long n)
{
    long long res = 1;
    while (n) {
        if (n % 2) {
            res *= a;
            res %= M;
        }
        a *= a;
        a %= M;
        n /= 2;
    }
    return res;
}

void precompute()
{
    fac[0] = 1;
    for (int i = 1; i <= 200000; ++i) {
        fac[i] = fac[i - 1] * i % M;
    }

    ifac[200000] = powerMod(fac[200000], M - 2);
    for (int i = 199999; i >= 0; --i) {
        ifac[i] = ifac[i + 1] * (i + 1) % M;
    }
}

long long choose(long long n, long long k)
{
    if (k < 0 || k > n) return 0;
    return (fac[n] * ifac[k] % M) * ifac[n - k] % M;
}

long long compute(long long n, long long positive, long long negative)
{
    long long k = n / 2 - positive;
    if (n % 2 == 0) {
        return choose(n - positive - negative, k);
    }
    return choose(n - positive - negative + 1, k + 1); 
}

signed main()
{
    // freopen("input.txt", "r", stdin);

    precompute();
    int t;
    cin >> t;
    while (t--) {
        int n, l, r;
        cin >> n >> l >> r;

        int m = max((r - l + 1) / 2, max(-l, r - n));
        // cout << k << endl;
        int k = min(-l, r - n);
        // cout << m << endl;

        long long res = k * compute(n, 0, 0) % M;

        int i = 1, j = n;
        long long positive = 0, negative = 0;
        while (++k <= m) {
            if (l - i > -k && r - i < k) break;
            if (l - j > -k && r - j < k) break;
            
            if (l - i > -k) {
                ++positive;
                ++i;
            }
            else if (r - i < k) {
                ++negative;
                ++i;
            }

            if (l - j > -k) {
                ++positive;
                --j;
            }
            else if (r - j < k) {
                ++negative;
                --j;
            }

            long long add = compute(n, positive, negative);
            // cout << k << ' ' << positive << ' ' << negative << ' ' << add << endl;
            if (add == 0) break;

            res += add;
            res %= M;
        }
        cout << res << endl;
    }

    return 0;
}