You are given positive integers , , and a permutation of .
Compute the number of ordered -tuples of permutations of satisfying all of the following conditions, modulo .
Composition of permutations is defined as function composition. That is, for two permutations , we have .
The input is given in the following format.
Print the number of ordered -tuples satisfying the conditions, modulo .
Here, denotes the value of .