import re
s = re.sub(r'(\b\w+)\s+\1', r'\1 <strong>\1</strong>', 'fly me to the the moon')
print(s)