Given a
single-chain olefin containing

bonds.
Now there are

molecules of hydrogen, which can undergo

addition reactions with this olefin.
An addition reaction, in organic chemistry, is in its simplest terms an organic reaction where two or more molecules combine to form a larger one (the adduct).[1][2]
Addition reactions are limited to chemical compounds that have multiple bonds, such as molecules with carbon–carbon double bonds (alkenes), or with triple bonds (alkynes), and compounds that have rings, which are also considered points of unsaturation. Molecules containing carbon—hetero double bonds like carbonyl (C=O) groups, or imine (C=N) groups, can undergo addition, as they too have double-bond character.
—— Wikipedia
For example, addition reactions on 1,3-Butadiene may happen in the following ways:
If the
character is
, it means that the
carbon and the
carbon are connected by a carbon-carbon single bond;
Otherwise, it means that the
carbon and the
carbon are connected by a carbon-carbon double bond.
And any possible addition reaction can be described as an operation as follows:
1. Select a continuous non-empty substring of the string

. Both ends of the substring (

) must be

, and no two adjacent characters are the same. In particular, the substring may only contain one character, and the character is

.
2. Change

to

and

to

in this substring.
And this operation can be recorded as
%5C)
.
After one operation, the resulting string will correspond to a new olefin. This new olefin is the product of this addition reaction, and the next addition reaction will proceed to this new olefin.
The addition reaction happens

times orderly, that is,

operations

are done in sequence.
Please calculate the number of possible operation sequences,
modulo
.
Two
operation sequences 
are different if and only if there is an

that
As olefins with two adjacent carbon-carbon double bonds may not exist stably, you can assume that there are no adjacent carbon-carbon double bonds in the given olefin.
It is guaranteed that

,and there are no two adjacent

s in the string.
Also, it is guaranteed that the compound is an olefin, that is, there is at least one carbon-carbon double bond in it.