HP is standing at a distance of X kilometres from her house . She can travel at most K kilometres in a single step. She wants to know total number of ways to reach her house . As the number of ways can be large , print it modulo .
Note : She can't take step of 0 kilometres, i.e., step should be integer.
Input :
First line contains one integers T denoting number of test cases .
Each of the next T lines contains two integers X and K.
Output :
For each test case, print the number of ways modulo . Answer for each test case should come in a new line.
Constraints :
For Test case 1 :
and , so she can reach in 3 ways
a (taking all step of one)
b ( step one and as two)
c ( two and as one)