Little Shino loves to play with numbers. She just came to know about Fibonacci Series.
Fibonacci Series is a series of number such that
Soon Little Shino realized that Fibonacci series grows very fast. So she just wants the sum of last 4 digits of the where (mod ) . Can you help her.
Input:
First line of each test case contains one integer, T, number of test cases.
Each test case contains two integer, l and r.
Output:
Print the sum of last 4 digits of the where (mod ).
Constraints:
First case:
Sum of last 4 digits of and is 2.
Second case:
Sum of last 4 digits of and is 4.
Third case:
Sum of last 4 digits of and is (mod ) =