import re
text = "CEEEETTEEEEGGGCCBCTTBHHHHHCCEEEEEEEEETTEETT"
print( re.sub(r'(.)(?=(?!\1).)', r'\1 ', text, flags=re.S) )