#C9057. Reverse Vowels in a String

    ID: 53108 Type: Default 1000ms 256MiB

Reverse Vowels in a String

Reverse Vowels in a String

Given a string (s), reverse only its vowels and output the modified string. The vowels are defined as (a, e, i, o, u) (both lowercase and uppercase). This means that the positions of the vowels in the string are swapped such that the first vowel swaps with the last vowel, the second with the second-last, and so on, while the positions of all other characters remain unchanged.

For example, if the input string is "hello", then the output should be "holle" since the vowels 'e' and 'o' are swapped.

inputFormat

The input consists of a single line containing the string (s). The string may include spaces, letters and punctuation. The input is read from standard input (stdin).

outputFormat

Output the modified string after reversing its vowels. The result should be printed to standard output (stdout).## sample

hello
holle