Dharam was sitting in his hostel. He found a magical wand in Shikhar's room. The wand generates a magical series:
Dharam realised that wand works on a magical function F(N) for some magical integer N, such that F(N) represents the Nth term of the magical series.
For two more magical integers L and R, Dharam wants to find the integer S:
Dharam wants to find S % M, for M = 1000000007 (109 + 7).
Input
First line of input is an integer T, total number of test cases, followed by T lines. Each line consists of two space separated integers L and R.
Output
Output S % M in single line for each test case.
Constraints
Note: Large input data. Use fast I/O.
For L = 1, R = 3: F(1) = 1 F(2) = 2 F(3) = 2
So S = F(1) + F(2) + F(3) = 1 + 2 + 2 = 5