letters = 'bcdfghjklmnpqrtvwxyzBCDFGHJKLMNPQRTVWXYZ'

phrase = input()
output = ''
vowels = ''

phrase = phrase.replace(' ', '')

for char in phrase:
    if char in letters:
        output += char
    else:
        vowels += char

print(output)
print(vowels)
not_vowel = 'bcdfghjklmnpqrtvwxyzBCDFGHJKLMNPQRTVWXYZ'

phrase = input()

output = ''
vowels = ''

# Remove sapces
phrase = phrase.replace(' ', '')

for char in phrase:
    if char in not_vowel:
        output += char  # Add non vowel to output
    else:
        vowels += char  # Add vowels to vowels

print(output)
print(vowels)

Clean it up a bit
Clean it up a bit