from typing import Dict
from typing import Any
from typing import List


def invert_dict_of_lists(dict_of_lists: Dict[Any, List[Any]]) -> Dict[Any, Any]:
    """
    Given a dictionary mapping x -> [a, b, c], invert such that it now maps all a, b, c -> x.
    If same value in multiple keys, then inverted dictionary overwrites arbitrarily.

    Parameters
    ----------
    dict_of_lists:
        Input dictionary of lists.

    Returns
    -------
    Inverted:
        Output inverted dictionary.
    """
    inverted = {}

    for key, val in dict_of_lists.items():
        for item in val:
            inverted[item] = key

    return inverted