from typing import Any
from typing import get_args


def get_inner(hint: Any, *indexes: int) -> Any:
    """Return an inner type hint by indexes."""
    if not indexes:
        return hint

    index, indexes = indexes[0], indexes[1:]
    return get_inner(get_args(hint)[index], *indexes)