eolymp
Competitions

2022 Azerbaijan Round 1, 8-9-10-11 classes

Grasshopper and chain

One day the grasshopper, as usual, was walking in the meadow. He found the chain. He was interested in one question, what is the minimum jump skill he needs to reach the end of the chain. Note that the chain only consists of uppercase English letters, and the grasshopper can only jump to vowels in the chain.

First, the grasshopper is located to the left of the leftmost symbol in the chain, and its goal is to get to the cell directly to the right of the rightmost symbol. In one jump, the grasshopper can jump any distance from 1 up to its jump skill. Let's look at the picture below for clarity.

prb11338.gif

Note: The vowel letters are A, E, I, O, U и Y.

Input

One string S (1S100), consisting of capital English letters.

Output

Print one number - the minimum jumping ability of a grasshopper.

Time limit 1 second
Memory limit 128 MiB
Input example #1
ABABBBACFEYUKOTT
Output example #1
4
Input example #2
AAA
Output example #2
1
Source 2022 Azerbaijan Round 1, 8-9 classes