Rahul entered lift on the ground floor of his building which consists of Z floors including the ground floor.

The lift already had N people in it. It is known that they will leave the lift in groups. Let us say that

there are M groups. Rahul is curious to find the number of ways in which these M groups can leave the lift.

It is assumed that each group is unique and no one leaves the lift on the ground floor.

Since the answer can be too large take modulo 1000000007

**Input:**

The first line of input constists of the number of testcase T. Next T lines consists of three integers Z , N , M

**Output:**

Output consists of T lines each indicating the answer for each test case.

**Constraints:**

1 <= T <= 10000

1 <= M <= 100000

1 <= Z <= 100000

1 <= N <= 100000

**Example:**

Sample Input :

1

3 10 2

Sample Output :

6

**Explanation :**

Let the groups are A and B.

1. Both A and B gets down on first floor A going first followed by B

2. Both A and B gets down on first floor B going first followed by A

3. Both A and B gets down on second floor A going first followed by B

4. Both A and B gets down on second floor B going first followed by A

5. A gets down of first floor and B gets down on second.

6. B gets down of first floor and A gets down on second.

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

d_Coder00 | 134 |

dungeon_master1299 | 126 |

Astikeysingh | 120 |

rajendrashekhawat063 | 115 |

kaustavbhattachaarya | 111 |

Pulkit__Sharma__ | 646 |

Anirban166 | 531 |

abducodes | 501 |

Found_me | 454 |

Yo_Nehru | 404 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4559 |

Login to report an issue on this page.