pattern = '([A-Z]{2,}(?=[A-Z]|$)|[A-Z](?=[a-z]|$))'
chunks = deque(re.split(pattern, 'HDMWhoSomeMONKEYThingXYZ'))
result = []
while len(chunks):
    buf = chunks.popleft()
if len(buf) == 0:
    continue
if re.match('^[A-Z]$', buf) and len(chunks):
    buf += chunks.popleft()
result.append(buf)
print(' '.join(result))
Regex divide with upper-case