#P7541. [COCI 2009/2010 #1] DOBRA

[COCI 2009/2010 #1] DOBRA

Description

Lea wrote down a word, and then she replaced some letters in the word with underscores _. Next, Lea will replace the underscores with other letters.

Lea thinks that a word is pleasant if it does not contain 33 or more consecutive vowels, does not contain 33 or more consecutive consonants, and contains at least one uppercase letter L.

Hint: The vowels are only a,e,i,o,u\texttt{a,e,i,o,u}, and all other letters are consonants.

Find how many ways Lea can replace the underscores with uppercase letters so that the word is pleasant.

Input Format

One line with a string, representing the word Lea wrote.

It is guaranteed that the string contains at most 1010 underscores, and consists only of uppercase letters and underscores.

Output Format

One line with one integer, representing the number of ways.

Note: You need to use a 6464-bit signed integer. Use long long in C/C++, and int64 in Pascal.

L_V
5
V__K
10
JA_BU_K_A
485

Hint

Constraints

For 100%100\% of the testdata, the string length is 100\le 100.

Explanation

The score for this problem follows the original COCI setting, with a full score of 7070.

This problem is translated from COCI2009-2010 CONTEST #1 T3 DOBRA

Translated by ChatGPT 5