"We have a holiday tomorrow, its Ambedkar Jayanti" says Chotu.
"I will sleep and eat whole day!!" exclaims Motu.
"Also we don't have to attend the two class of B.S.S :p" says Chotu cheerfully.
Chotu and Motu have no idea that their chat has been overheard by a third year senior. As they love troubling the first years. They made a plan to ruin their holiday.
The plan is very naive - just take a class the next day, also they decide that the class will start at 03:00 PM so that the first years have to face the scorching heat on
their way to class.
Yes they are pretty evil :p
Late night the first years receives a mail with the subject "Regarding Competitive Coding Classes". An urgent meeting has been arranged to counter this evil move of the seniors.
"After that boring lecture on Heaps who will attend the lectures" shouts someone
"No it's a new topic we should go"
The students were confused whether to attend the class or not.
Chotu has been observing all this chaos and comes forward to explain his plan, so that each student can independently decide whether to attend the lecture or not.
"Just calculate your Willingness factor (W), it will help you decide" says Chotu.
Everyone agrees with Chotu's plan.
Now Willingness factor is pretty hard to calculate so only a good programmar can calculate it.
Hence you are given the responsiblility to calculate the Willingness factor for each of the student.
Each of the T student has following three attributes.
1) Energy denoted by N.
2) Patience denoted by M.
3) Current Codechef rating K.
Let W(N, M, K) be the willingness factor.
W(N, M, K) = (Numerator / Denominator) % K
Numerator = Fac(N + M) * Fac(N + M + 1)
Denominator = Fac(N) * Fac(N + 1) * Fac(M) * Fac(M + 1)
Note - W(N, M, K) will always be integral i.e, (Numerator % Denominator = 0) .
Note - Fac(X) = X! = 1 * 2 * 3 * 4 * 5 .. . .. . .* X.
Can you calculate the Willingness factor for each student.
INPUT
First line of input contains T the number of the first year students.
Next T lines contain 3 integers each N, M, K, denoting the energy, patience and the ranking of the student.
OUTPUT
For each student print the willingness factor W.
CONSTRAINTS
1 <= T <= 20
1 <= N <= M <= 105
1 <= K <= 109 + 7