from typing import Union


def attr_data(data: dict, attributes: list[Union[str, int]]):
    """Get data from a data structure, drilling down."""
    rval = data
    for attr in attributes:
        rval = rval[attr]
    return rval