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>
using namespace std;
const int N=2e5+5;
const int mod=1e9+7;
int T;
int n,l,r;
int frac[N],inv[N];
void init(){
        frac[0]=frac[1]=inv[0]=inv[1]=1;
        for(int i=2;i<N;i++)frac[i]=1ll*frac[i-1]*i%mod,inv[i]=1ll*(mod-mod/i)*inv[mod%i]%mod;
        for(int i=2;i<N;i++)inv[i]=1ll*inv[i]*inv[i-1]%mod;
}
inline int C(int a,int b){if(a<b)return 0;return 1ll*frac[a]*inv[b]%mod*inv[a-b]%mod;}
#define P pair<int,int>
int main(){
        init();
        cin>>T;
        while(T--){
                cin>>n>>l>>r;
                int ans=0;
                vector<int>a;
                map<int,int>mp[3];
                for(int i=1;i<=n;i++){
                        P x=P(l-i,r-i),y=P(i-r,i-l);
                        int now=0;
                        if(l-i>i-r)swap(x,y),now=1;
                        if(x.first<y.first){
                                mp[now][x.first]++;
                                mp[now][y.first]--;
                                a.push_back(x.first);
                                a.push_back(y.first);
                        }
                        mp[2][y.first]++;
                        mp[2][x.second+1]--;
                        a.push_back(y.first);
                        a.push_back(x.second+1);
                        if(x.second<y.second){
                                now^=1;
                                mp[now][x.second+1]++;
                                mp[now][y.second+1]--;
                                a.push_back(x.second+1);
                                a.push_back(y.second+1);
                        }
                }
                sort(a.begin(),a.end());
                a.erase(unique(a.begin(),a.end()),a.end());
                int cnt[3]={0,0,0};
                for(int i=0;i<a.size()-1;i++){
                        for(int j=0;j<3;j++)cnt[j]+=mp[j][a[i]];
                        int wap=a[i+1]-a[i];
                        if(cnt[0]+cnt[1]+cnt[2]==n&&cnt[0]<=(n+1)/2&&cnt[1]<=(n+1)/2){
                        /*
                                if(cnt[0]+cnt[1]==0){
                                        ans=(ans+C(n,n/2)*1ll*wap)%mod;
                                        continue;
                                }*/
                                int need=n/2-cnt[0];
                                ans=(ans+1ll*wap*C(cnt[2],need))%mod;
                                if(n&1){
                                        need=(n+1)/2-cnt[0];
                                        ans=(ans+1ll*wap*C(cnt[2],need))%mod;
                                }
        //                      cout<<ans<<endl;
                        }
                }
                ans=(ans+1ll*mod-C(n,n/2)*1ll+1ll*mod-(n&1)*C(n,n/2))%mod;
                cout<<ans*1ll*inv[2]%mod<<endl;
        }
        return 0;
}