🏡 index : github.com/captn3m0/codechef.git

---
{"languages_supported":{"0":"NA"},"title":"BYTESHOP","category":"NA","old_version":true,"problem_code":"BYTESHOP","tags":{"0":"NA"},"layout":"problem"}
---

<h3> All submissions for this problem are available. </h3><p>
There are N shoppers today at the Bytelandian Shopping Mall. There are M different items at sale at the mall. In how many ways can shoppers purchase R items in all such that everyone buys atleast one item, and every item is brought by atleast one person ? A shopper can purchase any particular item at most once.

</p>

<pre>
Input :
The first line contains the number of test cases T. T lines follow containing 3 integers: N,M and R. 
(1 &lt;= T &lt;= 100. 1 &lt;= N,M &lt;= 200. 1 &lt;= R &lt;= N * M)

</pre>

<pre>
Output :
Output T lines, one for each test case, containing the output for the corresponding test case.
Output all values modulo 1000000007

</pre>

<pre>
Sample Input :
3
1 1 1
2 1 1
2 3 3

</pre>

<pre>
Sample Output :
1
0
6
</pre>