P14967 [HackerEarth] Bhanderi is a kind-hearted person. He loves giving away things.
提高-
题目描述

Bhanderi is a kind-hearted person. He loves giving away things.

He has N candies. There are M students waiting in a line to collect candies. The students take turns to collect candies, since he does not want some students to have way more candies than other, he has decided that no student will get more than C candies, but a student may get 0 candies ( Yes, he will feel bad but it's okay ).

Formally for each student, if the number of candies received is x then 0 ≤ x ≤ C

He wants to find the number of ways to divide the candies among the students. Two ways are different if atleast one student receives different amount of candy.

But, Bhanderi is not able to find the total number of ways. Help poor Bhanderi solve the task at hand!

Input format
The first line of input contains T denoting the number of test cases

The only line of input for each test case contains three space separated integers N M C

Output format
Output one integer per line per test case, since the number of ways can be pretty huge, output is modulo 10^9 + 7

Constraints

1 ≤ T ≤ 100
1 ≤ N ≤ 10^5
1 ≤ M ≤ 10^5
1 ≤ C ≤ 100

Sub-tasks
For 25% points : 1 ≤ N, M, C ≤ 10

For 75% points : original constraints

SAMPLE INPUT
1
4 2 3

SAMPLE OUTPUT
3

Explanation

3 ways are
(1,3)
(2,2)
(3,1)

输入格式

见题面

输出格式

见题面

样例输入
100 7 3 9 5 5 3 10 9 10 6 1 3 9 10 4 6 1 8 5 2 6 6 1 8 3 3 7 7 9 9 1 6 6 9 9 6 3 8 3 1 2 6 1 5 4 3 5 6 5 7 3 2 10 9 8 2 4 5 3 4 7 7 5 6 8 10 7 7 8 9 5 3 5 10 10 3 10 1 7 5 9 8 2 9 8 2 2 8 4 4 5 1 9 10 9 4 10 8 9 1 7 4 10 5 2 2 5 1 4 9 6 9 3 3 8 8 7 1 5 7 6 8 1 5 10 5 7 7 3 1 6 10 1 1 5 2 3 3 10 10 8 7 8 3 6 2 6 6 10 4 4 8 8 7 5 1 3 6 7 8 9 5 7 1 6 4 8 2 5 10 1 3 7 1 7 5 3 4 7 5 4 3 3 2 7 9 7 3 7 1 6 8 4 5 2 4 4 6 1 2 7 1 1 5 8 3 2 10 4 1 7 1 9 6 9 9 6 1 8 6 10 10 4 8 8 7 3 10 10 1 4 5 3 1 6 5 9 7 6 2 5 10 4 9 1 10 2 2 10 1 1 3 2 5 3 5 2 8 10 8 9 2 10 4 9 2 2 1 5 5 2 4 3 1 8 9 3 5 4 3 3 1 7 3 4 4 10 6 8 9 5 2 3 4 10 6 2 2 6 4
样例输出
35262156 194729210 85830467 466978513 171309957 521723579 67156076 822719135 941247941 894613587 652775581 0 60899643 349362885 160923174 414876 836294659 686999250 17130717 46358073 573638484 199001620 812625399 78779138 269072358 278474309 427721815 956956791 522228415 247235986 533472955 238779136 704106750 596607583 243638045 938570837 2399357 511336160 252572015 451155727 68162461 278051073 889886412 646145963 300269423 524494853 818444062 609965716 178258158 760109950 128482618 242558467 602988361 391472604 743208198 965130672 0 841149741 91358178 992252902 550563008 784623937 942860438 44425136 13101905 58730005 500780513 864601485 622837914 417765838 649139938 296388155 486505600 538223504 650558047 83655283 193872701 668115188 145492963 679214579 825775486 39373357 884449156 910172183 490769590 737084029 774085783 150398526 662773735 636359584 49899960 879907771 263216286 768559343 30916576 227891886 251652116 431710873 717848908 719287838