def reverse_vowels(str1):
	
	vowels = ""
	for char in str1:
		if char in "aeiouAEIOU":
			vowels += char
	result_string = ""
	for char in str1:
		if char in "aeiouAEIOU":
			result_string += vowels[-1]
			vowels = vowels[:-1]
		else:
			result_string += char
	return result_string
def reverse_vowels(str1):
    vowels = ""
    _char_i = 0
    while _char_i < len(str1):
        char = str1[_char_i]
        if char in "aeiouAEIOU":
            vowels += char
        _char_i += 1
    result_string = ""
   
    for char in str1:
        if char in "aeiouAEIOU":
            result_string += vowels[-1]
            vowels = vowels[:-1]
        else:
            result_string += char
    return result_string