Ayoub had an array a of integers of size n and this array had two interesting properties: 

  * All the integers in the array were between l and r (inclusive). 
  * The sum of all the elements was divisible by 3. 



Unfortunately, Ayoub has lost his array, but he remembers the size of the array n and the numbers l and r, so he asked you to find the number of ways to restore the array. 

Since the answer could be very large, print it modulo 10^9 + 7 (i.e. the remainder when dividing by 10^9 + 7). In case there are no satisfying arrays (Ayoub has a wrong memory), print 0.

Input

The first and only line contains three integers n, l and r (1 ≤ n ≤ 2 ⋅ 10^5 , 1 ≤ l ≤ r ≤ 10^9) — the size of the lost array and the range of numbers in the array.

Output

Print the remainder when dividing by 10^9 + 7 the number of ways to restore the array.

Examples

Input


2 1 3


Output


3


Input


3 2 2


Output


1


Input


9 9 99


Output


711426616

Note

In the first example, the possible arrays are : [1,2], [2,1], [3, 3].

In the second example, the only possible array is [2, 2, 2].
import java.util.*;


public class Test{

static int rem = 1000000007;
public static void main(String args[]){
 
 Scanner s = new Scanner(System.in);
 int n = s.nextInt();
 int l = s.nextInt() - 1;
 int r = s.nextInt();
 
 
 int zero = r/3;
 int one = zero;
 if(r%3 >= 1){
   one++;
 }
 
 int two = zero;
 
 if(r%3 == 2){
	 two++;
 }
 
 zero -= l/3;
 one -= l/3;
 two -= l/3;
 
if(l%3 == 2){
	 one--;
	 two--;
 }
 
 if(l%3 == 1){
	 one--;
 }
   
 
 long r0 = zero;
 long r1 = one;
 long r2 = two;
 for(int i=1;i<n;i++){
	long  rr0 = ((r0*zero)%rem + (r1*two)%rem + (r2*one)%rem)%rem;
    long  rr1 = ((r0*one)%rem + (r1*zero)%rem + (r2*two)%rem)%rem;
    long  rr2 = ((r0*two)%rem + (r1*one)%rem + (r2*zero)%rem)%rem;	 
 
      r0 = rr0;
	  r1 = rr1;
	  r2 = rr2;
 }
 
 
 
 System.out.println(r0);
 


}

}