College days are nearing it's end and this is making Sunny really SAD (for obvious reasons :P). He , being sad that he is, spends an awful lot of time listening to sad songs on his cell phone. He currently has
Nsongs all of which happen to be sad. He also has this weird habit of always listening to P songs continuously. His cell phone generates a playlist of P sad songs according to two rules - Each song has to be played at least once and At least
Msongs have to be played between any two occurrences of the same song (As he gets really sad when he listens to same song too frequently).
Sunny, trying to divert his mind from sadness, wonders how many distinct playlists his cell phone can create.He needs your help.
First line contains T denoting the number of test cases and Then T lines follow each containing 3 Integers denoting N, M and P respectively.
A Single Integer for each test case denoting the number of playlists % 1000000007.
0<= M <= N
1 0 3
1 1 3
Problem Setter : Arjun Singh Bhatia