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]. 
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.List;
 import java.util.*;
 public class realfast implements Runnable 
  {
    private static final int INF = (int) 1e9;
    long in= 1000000007;
    long fac[]= new long[1000001];
    long inv[]=new long[1000001];
    public  void solve() throws IOException 
    {

        fac[0]=1;
        inv[0]=1;
        for(int i=1;i<1000000;i++)
            fac[i]= (fac[i-1]*i)%in;
        for(int i=1;i<1000000;i++)
            inv[i]= pow(fac[i],in-2,in);

         

        int t = readInt();
        for(int f =0;f<t;f++)
        {
            int n = readInt();
            int l = readInt();
            int r = readInt();
            l--;
            r--;
            int l1 = Math.min(Math.abs(l),r);
            int r1 = Math.min(Math.abs(l-n+1),r-n+1);
            r1=Math.min(r1,l1);
            long ans=0;
           // r1++;
            ans = (r1*ncr(n,n/2))%in;
            //out.println(ans);
            if(n%2==1)
            {
                 ans = (ans*2)%in;
            }
         //   out.println(ans);
           // r1--;
            int left=0;
            int right=n-1;
            for(int i = r1+1;i<=r1+n;i++)
            {
                 while(l-left>(-i))
                 {
                         left++;
                 }
                 while(r-right<i)
                 {
                         right--;
                 }
                 if(n-left<(n/2)||right+1<(n/2)||n-left+right+1<n)
                    break;
                 int common =right+1-left;
            
                 int c=n/2-(right+1-common);

                 ans = (ans%in+ncr(common,c)%in)%in;


                 if(n%2==1)
                 {
                    c++;
                     ans = (ans%in+ncr(common,c)%in)%in;                     
                 }
                // out.println(i);

            }

            out.println(ans);



        }
        



    }
    public long ncr(int n , int r)
    {
             if(r<0||r>n||n<0)
                return 0;
            long val = (fac[n]*inv[r])%in;
            val = (val*inv[n-r])%in;
            return val;
        
    }
    public boolean check(int arr[] , int i ,int j , int k)
    {
              if(arr[i]>=arr[j]&&arr[j]>=arr[k])
                return false;
             else if(arr[i]<=arr[j]&&arr[j]<=arr[k])
             {
                  return false;
             }
             else
                return true;
    }
    
    public int value (int seg[], int left , int right ,int index, int l, int r)
    {
            
            if(left>right)
            {
              return -100000000;
            }
            if(right<l||left>r)
                return -100000000;
            if(left>=l&&right<=r)
                return seg[index];
            int mid = left+(right-left)/2;
            int val = value(seg,left,mid,2*index+1,l,r);
            int val2 = value(seg,mid+1,right,2*index+2,l,r);
            return Math.max(val,val2);

    }
   
    public int gcd(int a , int b )
    {
      if(a<b)
      {
        int t =a;
        a=b;
        b=t;
      }
      if(a%b==0)
        return b ;
      return gcd(b,a%b);
    }
    public long pow(long n , long p,long m)
    {
         if(p==0)
            return 1;
        long val = pow(n,p/2,m);;
        val= (val*val)%m;
        if(p%2==0)
            return val;
        else
            return (val*n)%m;
    }
    
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    public static void main(String[] args) {
        new Thread(null, new realfast(), "", 128 * (1L << 20)).start();
    }
 
    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private PrintWriter out;
 
    @Override
    public void run() {
        try {
            if (ONLINE_JUDGE || !new File("input.txt").exists()) {
                reader = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                reader = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            solve();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                reader.close();
            } catch (IOException e) {
                // nothing
            }
            out.close();
        }
    }
 
    private String readString() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
 
    @SuppressWarnings("unused")
    private int readInt() throws IOException {
        return Integer.parseInt(readString());
    }
 
    @SuppressWarnings("unused")
    private long readLong() throws IOException {
        return Long.parseLong(readString());
    }
 
    @SuppressWarnings("unused")
    private double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }
}
class edge implements Comparable<edge>{
    long u ;
    long v;
    
    edge(long u, long v)
    {
       this.u=u;
       this.v=v;
    }
    public int compareTo(edge e)
    {
        if(this.v>=e.v)
        return 1;
        else
        return -1;

    }
}