Given two integers and , count the number of ordered pairs of integers in the range such that and . Since the answer may be very large, output it modulo .
There will be such test cases.
The first line contains an integer .
The new line contains two integers, and .
Output a single integer, the number of pairs modulo .
1 5 6
Explanation for Sample
The pairs are , , , , , , , .