def letter_index_upper(letter: str) -> int:
    """Gives the alphabetic index corresponding to an uppercase letter.

    Args:
        letter: An uppercase letter, from 'A' to 'Z'.

    Returns:
        An alphabetic index, from 1 to 26.
    """
    return ord(letter) - ord('A') + 1