import re


def safe_capitalize(phrase: str) -> str:
	"""Capitalize first letter in each word without affecting rest.
    
    Python's built in str.title() will turn 'transgender LatinX person' into 
        'Transgender Latinx Person' (x in LatinX made lowercase).
    """
	# Special case for Shi'ite so that we don't turn shi'ite into Shi'Ite
	if phrase.lower() == "shi'ite":
		return "Shi'ite"
	return re.sub("([a-zA-Z]+)", lambda x: x.groups()[0][0].upper() + x.groups()[0][1:], phrase)