Baltic archaeologists are currently engaged in a very important project and have recently found an ancient manuscript that seems to be crucial for the understanding of the culture that inhabited the area they are exploring. The manuscript is full of drawings, so scientists are able to get a general feel for the subject of the document.
However, there is also a written part, and with that scientists are in trouble. Apart from the language used in the writing being a very ancient, several parts of manuscript were destroyed, some letters disappeared, and they are unable to completely understand what is written there.
One of the scientists said, that the words in the manuscript remind him of a language about which it is known that in any word there may be no more than VC and CC consecutive vowels and consonants, respectively, and that no more than VE and CE consecutive vowels and consonants, respectively, may be equal.
That scientist left the group in search of a more precise information. The others, while waiting for that scientist to return, decided to check whether nothing in the manuscript contradicts his hypothesis and estimate the amount of work that may lie ahead, so they want to know in how many different ways the manuscript can possibly be deciphered. We must help them!
Note: vowels are “aeiou” and there are 21 other letters in the alphabet - consonants.
입력 1 1 1 1 a** 출력 105 입력 1 1 1 1 b*i 출력 0 입력 1 2 1 2 ancient 출력 1 입력 4 4 4 4 man****ipt 출력 261870 입력 2 2 2 2 *boi* 출력 546
출처:boi 2005