def narrow_seat_position(
    char: str, lower_char: str, upper_char: str, lower_limit: int, upper_limit: int
) -> tuple[int, int]:
    """Half the range of the seat position ([lower_limit, upper_limit]) given the value of char."""

    half_range = (upper_limit - lower_limit + 1) / 2

    if char == lower_char:

        return lower_limit, int(upper_limit - half_range)

    elif char == upper_char:

        return int(lower_limit + half_range), upper_limit

    else:

        raise ValueError(
            f"unexpected char ({char}) with lower_char ({lower_char}) and upper_char ({upper_char})"
        )