Implement an algorithm to convert a standard string into Pig Latin.
The input is a string containing alphabetic words, whitespace, and optional punctuation. Convert each word independently: words beginning with a vowel receive way, while words beginning with one or more consonants move that consonant prefix to the end followed by ay. Preserve whitespace, punctuation, and the original capitalization style.
Input: one string. Output: the transformed string. Treat y as a consonant and return an empty string unchanged.
a, e, i, o, and u as vowelsy as a consonantdef convert_to_pig_latin(text):