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<map>
#include<cmath>
#include<queue>
#include<set>
#include<numeric>
#include<algorithm>
#include <utility>
#include <stack>
#define int long long
using namespace std;

int MOD=1000000007;
int MOD1=998244353;

int A[200001],B[200001];

int fastex(int a, int b){
    if(b==0) return 1;
    int x= fastex(a, b/2);
    x *= x;
    x %= MOD;
    if(b%2) x *= a;
    x %= MOD;
    return x;
}

void calc(){
    int l=1;
    for(int i=1; i<200001; i++){
        A[i]=l;
        B[i]= fastex(l, MOD-2)%MOD;
        l=((i+1)*l)%MOD;
    }
}

int nCr(int n, int r){
    if(n!=r && r!=0){
        return ((((A[n]*B[n-r])%MOD)*B[r])%MOD);
    }
    else return 1;
}

signed main() {
    calc();
    int t;
    cin>>t;
    while(t--){
        int n,l,r;
        cin>>n>>l>>r;
        if(n%2==0){
            int m=min(abs(1-l),abs(r-n)),j=1;
            r=max(abs(m-abs(1-l)),abs(m-abs(r-n)));
            int tot=(m*nCr(n,n/2))%MOD;
            //cout<<tot<<"\n";
            while(j<=r && j<n/2){
                tot=(tot+nCr(n-j,n/2))%MOD;
                j++;
                //cout<<tot<<"\n";
            }
            //cout<<tot<<"\n";
            if(j<n/2){
                int j1=1;
                while(n-j>n/2){
                    tot=(tot+nCr(n-j-j1,n/2-j1))%MOD;
                    //cout<<tot<<"\n";
                    j++;
                    j1++;
                }
            }
            cout<<tot+1<<"\n";

        }
        else{
            int m=min(abs(1-l),abs(r-n)),j=1;
            r=max(abs(m-abs(1-l)),abs(m-abs(r-n)));
            int tot=(2*(m*nCr(n,n/2)))%MOD;
            //cout<<tot<<"\n";
            while(j<=r && j<=n/2){
                tot=(tot+nCr(n-j,n/2)+nCr(n-j,n/2+1))%MOD;
                //cout<<tot<<"\n";
                j++;
            }
            //cout<<tot<<"\n";
            if(j<=n/2){
                int j1=1;
                while(n-j>n/2){
                    tot=(tot+nCr(n-j-j1,n/2-j1)+nCr(n-j-j1,n/2-j1+1))%MOD;
                    //cout<<tot<<"\n";
                    j++;
                    j1++;
                }
            }
            if(r>0){
                cout<<tot+1<<"\n";
            }
            else{
                cout<<tot<<"\n";
            }

        }
    }

}
