For a permutation of the numbers we define a split as a permutation which can be obtained by the following process:
Select two sets of numbers and such that , , and
The permutation will be
Moreover, we define to be the set of all splits of a permutation .
You are given a number and a set of permutations of length . Count how many permutations of length exist such that . Since this number can be large, find it modulo .