One day, the String God showed Akura a very beautiful string

that contains only the characters

and

. Akura was mesmerized and wanted to replicate the same string.
Akura starts with an empty string, and he can add either an

or a

to the end of the string each time until he gets

. However, the String God’s string has very powerful antimemetics, and once Akura looks away from

,
he forgets all the information about it. Thus, Akura doesn’t know which
character to add each step and can only rely on intuition. After adding
a character, he can look at

to check if he made a mistake. If he adds the wrong character, Akura will correct the mistake in the best possible way.
Specifically, let

be the suffix of Akura’s string of length

,

be the prefix of

of length

, and

be the largest

such that

:
Once

equals the length of

, Akura will have a suffix equal to

, thus creating a copy of

.
For example, if the String God’s string is

and Akura currently has

. If Akura adds an

, which is incorrect, he will add a

to match the prefix of length

again, making the string

, and then add a

to match the prefix of length

.
Akura wants to know the number of possible ways to add

characters to complete this task. He wants the answers for all
![n \in [0, t] n \in [0, t]](https://www.nowcoder.com/equation?tex=%5Ctextstyle%20n%20%5Cin%20%5B0%2C%20t%5D)
. Since the answer can be very large, you only need to provide the answer modulo

.