You are given a long string with only character , and , please find the answer to the following two questions.
-
How many substrings that have all three kinds of characters?
-
How many sequences that have all three kinds of characters?
The answer could be very large, please modulo by .