题目描述
Problem Description
In spoken languages, there are two types of sounds: vowels and consonants. A vowel is produced with an open vocal tract, while a consonant is pronounced with at least partial obstruction of breath. For example, letters 'a' and 'o' represent vowel sounds, whereas letters 'b' and 'p' are consonants (e.g., "bad", "pot").
The letter 'y', typically used as a consonant (e.g., "silly"), can also function as a vowel (e.g., "yellow"). Similarly, the letter 'w', usually a consonant (e.g., "wet"), can produce a vowel sound after another vowel (e.g., "growth") in English, and in some languages (e.g., Welsh), it can even be the only vowel in a word.
In this task, we consider 'y' and 'w' as vowels. Thus, there are seven vowels in the English alphabet: 'a', 'e', 'i', 'o', 'u', 'w', and 'y'. All other letters are consonants.
We define the consonant fencity of a string as the number of pairs of consecutive letters that are both consonants and have different cases (lowercase followed by uppercase or vice versa). For example, the consonant fencity of "CoNsoNaNts" is 2, of "dEsTrUcTiOn" is 3, and of "StRenGtH" is 5.
You are given a string consisting of lowercase English letters. Your task is to change the case of some letters such that all identical letters are of the same case (i.e., no letter can appear as both lowercase and uppercase in the resulting string), and the consonant fencity of the resulting string is maximized.
Input Format
The only line of input contains a non-empty string consisting of no more than \(10^6\) lowercase English letters.
Output Format
Output a single line: the input string modified to have the maximum consonant fencity.
Sample Input and Output
Sample Input #1
consonants
Sample Output #1
CoNsoNaNts
Sample Input #2
destruction
Sample Output #2
dEsTrUcTiOn
Sample Input #3
strength
Sample Output #3
StRenGtH
Notes/Hints
Time limit: 3 seconds, Memory limit: 512 MB.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分