def METHOD_NAME(val, key=""):
    dc: dict = dict()
    if isinstance(val, list):
        for v in val:
            dc = {**dc, **METHOD_NAME(v, key)}
        return dc
    if isinstance(val, dict):
        for k, v in val.items():
            dc = {**dc, **METHOD_NAME(v, key + k)}
        return dc
    return {**dc, **{key: val}}