Gromah and LZR have entered the final level. In this level, they need to cross the sea of death to gain the treasures.
The sea of death is of width

, and there are

stones inside the sea. Assume that Gromah and LZR are at position

initially, that the treasures are at position

, and that stones are at position

respectively. So Gromah and LZR can jump on the stones to cross the sea.
Unfortunately, the stones are not stable. To ensure safety, Gromah and LZR should go forward at least

positions each time. Formally, if they are at position

currently, they should jump onto the positions not less than

. Moreover, they can't be at positions greater than

in any time, which means that the destination of their last jump should be exactly position

, or the treasure keepers will see them and come to eat them.
More unfortunately, the Infernos under the sea will attack them

times in total, each attack can be described as a tuple
_%7B%7D)
, denoting that the stone at position

will be attacked right after their

-th jump, which means their destination of

-th jump can't be position

.
But fortunately, here comes the farmer(mentioned in problem I but not necessary to care in this problem) and he tells Gromah and LZR all the attack plans, so they can work out some jumping plans according to the information given by the farmer to get to the destination without being attacked.
Please help them determine the number of jumping plans satisfying all the restrictions described above. Since the number may be very large, you should report it modulo

.
Two jumping plans are considered different if there exists at least one

that their positions after

-th jump are different in two plans.