You are given a string sentence consisting of words separated by spaces. Convert sentence into Goat Latin according to the following rules:
If a word begins with a vowel ('a', 'e', 'i', 'o', or 'u', in either uppercase or lowercase), append "ma" to the end of the word.
If a word begins with a consonant (any letter other than a vowel), remove its first letter, append it to the end of the word, and then append "ma".
Append the character 'a' to the end of each word based on its 'a' to the 'a's to the 'a's to the
Return the resulting string after converting sentence to Goat Latin.
Constraints:
sentence.length
sentence consists of English letters and spaces.
sentence has no leading or trailing spaces.
All the words in sentence are separated by a single space.
You are given a string sentence consisting of words separated by spaces. Convert sentence into Goat Latin according to the following rules:
If a word begins with a vowel ('a', 'e', 'i', 'o', or 'u', in either uppercase or lowercase), append "ma" to the end of the word.
If a word begins with a consonant (any letter other than a vowel), remove its first letter, append it to the end of the word, and then append "ma".
Append the character 'a' to the end of each word based on its 'a' to the 'a's to the 'a's to the
Return the resulting string after converting sentence to Goat Latin.
Constraints:
sentence.length
sentence consists of English letters and spaces.
sentence has no leading or trailing spaces.
All the words in sentence are separated by a single space.