#include <bits/stdc++.h>   using namespace std;       #define ll long long   #define vi vector<int>   #define pii pair<int,int>   #define mii map<int,int>   #define pqb priority_queue<int>   #define pqs priority_queue<int,vi,greater<int> >       #define ff first   #define ss second   #define pb push_back   #define mp make_pair   #define PI 3.1415926535897932384626   #define MOD 1000000007   #define ps(x,y) fixed<<setprecision(y)<<x      long long int fact[200005];      long long int pwr(long long int a,long long int b){       if(b==0) return 1;       if(b==1) return a%MOD;       long long int q = pwr((a*a)%MOD,b/2);       if(b%2) return (q*a)%MOD;       return q;   }      long long int C(long long int a,long long int b){       if(b<0) return 0;       if(a<b) return 0;          long long int t1 = (fact[a])%MOD;       long long int t2 = (fact[b]*fact[a-b])%MOD;       t2 = pwr(t2,MOD-2)%MOD;          return (t1*t2)%MOD;   }      void solve(){          long long int n,l,r;       cin>>n>>l>>r;          long long int ans=0;       ans = C(n,n/2)%MOD;       if(n%2) ans = (ans*2)%MOD;       ans = (ans*(min(1-l,r-n)))%MOD;        for(long long int p=min(1-l,r-n)+1;p<=min(r,n+1-l);p++){           long long int a = p + l - 1;           if(a<=0) a = 0;           long long int b = n + p - r;           if(b<=0) b=0;              ans = (C(n-a-b,n/2-a) + ans)%MOD;           if(n%2) ans = (C(n-a-b,n/2-b) + ans)%MOD;       }       cout<<ans<<endl;          return;       }        int main(){          ios_base::sync_with_stdio(false);       cin.tie(NULL);           // freopen( input.txt ,  r , stdin);       // freopen( error.txt ,  w , stderr);       // freopen( output.txt ,  w , stdout);          fact[0]=1;       for(long long int i=1;i<200005;i++){           fact[i] = (fact[i-1]*i)%MOD;       }           int t=1;       cin>>t;           for(int i=1;i<=t;i++){           // cout<< Case # <<i<< :  ;           solve();       }           cerr <<  time taken :   << (float)clock() / CLOCKS_PER_SEC <<   secs  << endl;       return 0;   }