import re


def split_camel_case(text: str) -> str:
    """Split words written in camelCase."""
    return re.sub(
        r"("
        r"(?<=[a-z])"
        r"[A-Z]|"
        r"(?<!\A)"
        r"[A-Z]"
        r"(?=[a-z])"
        r")", r" \1", text)