import re
text = 'CubsWhite Sox'
print( re.sub('([A-Z][a-z]+)', r' \1', re.sub('([A-Z]+)', r' \1', text.split()[0])).split() )