SP20637 AJOB - Ajob Subsequence
Description
You are currently studying the language **_Ajob_** ( which means strange in English ) from a renowned professor. The language has infinite number of letters in its alphabet ( now you know, why it is called ajob ).
The professor taught you **_N_** words, one by one. The number of letters in a word is equal to it's place in the teaching order. Thus, the _**1 $ ^{st} $**_ word taught by the professor has _**1**_ letter, _**2 $ ^{nd} $**_ word has _**2**_ letters, _**3 $ ^{rd} $**_ word has _**3**_ letters, ..., the _**N $ ^{th} $**_ word has _**N**_ letters.
_All the letters within a word are distinct to each other_.
Now, you are handed an assignment. You have to choose any one of the _**N**_ words and form a subsequence from it. The length of the subsequence should be **exactly** _**K**_ less than the length of original word. For example, if the length of the chosen word is _**L**_, then the length of the subsequence should be _**L-K**_. If for any word, _**L**_ is smalller than _**K**_ _**(L
Input Format
The first line contains _**T**_, the number of testcases. The next _**T**_ lines contain three space separated integers _**N**_, _**K**_ and _**p**_.
Output Format
For each testcase, print one integer in a single line, the number possible ways you can complete the assignment, _**modulo p**_.