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 <algorithm>
#include <cstdio>
#define ll long long
const int N = 1e6 + 10, mod = 1e9 + 7;
int t, n, f[N] = {1}, inv[N] = {1}; // inv是逆元，f是阶乘
ll mul(ll a, ll n) { // 快速幂
    if (!n) return 1;
    ll v = mul(a, n / 2); v = v * v % mod;
    if (n & 1) v = v * a % mod;
    return v; 
}
int C(int n, int m) { // 求组合数
    if (m < 0) return 0;
    if (m > n) return 0;
    return 1ll * f[n] * inv[m] % mod * inv[n - m] % mod;
}
int main()
{
    for (int i = 1; i < N; i++) // 预处理阶乘和逆元
        f[i] = 1ll * i * f[i - 1] % mod, inv[i] = mul(f[i], mod - 2);
    scanf("%d", &t);
    while(t--) {
        int l, r, ans = 0, d;
        scanf("%d%d%d", &n, &l, &r);
        for (d = std::min(r - 1, n - l); d >= 1; d--) { // 枚举偏移量
            int c1 = std::min(std::max(0, r - d), n); // 选择i+d
            int c2 = std::min(std::max(0, n - d - l + 1), n); // 选择i-d
            if (c1 == n && c2 == n) break;
            if (c2 > c1) std::swap(c1, c2);
            if (n & 1) {
                ans += C(c1 + c2 - n, n / 2 - (n - c1)); // 选择较大的可选区间
                ans %= mod;
                ans += C(c1 + c2 - n, n / 2 + 1 - (n - c1));
            }
            else ans += C(c1 + c2 - n, n / 2 - (n - c1));
            ans %= mod;
        }
        if (n & 1) ans += 2ll * d * C(n, n / 2) % mod;
        else ans += 1ll * d * C(n, n / 2) % mod;
        ans %= mod;
        printf("%d\n", ans);
    }
    return 0;
}
