import re


def word_shape(doc: str) -> str:
    """Aggressive normalization function used in unit tests.

    Args:
        doc (str): The document to normalize.

    Returns:
        str: The normalized document.
    """
    return re.sub("[A-Z]", "X", re.sub("[^A-Z ]", "x", doc))