def recursive_dict_filling(dct, keys, value):
    """
    Recursively add value to an arbitrary deep dictionary structure based on a list of keys.
    """
    if not keys:
        return value
    else:
        if not keys[0] in dct.keys():
            dct[keys[0]] = dict()
        dct[keys[0]] = recursive_dict_filling(dct[keys[0]], keys[1:], value)
        return dct