def merge_dicts(*dicts):
    """ Input is an arbitrary amount of dictionaries.
    Output is a merged dictionary where the keys are the
    keys from all the input dicts, and the values are a
    list of all the values each key holds """

    new_dict = {}
    for i in dicts:
        for (k, v) in i.items():
            if k in new_dict:
                new_dict[k].append(v)
            else:
                new_dict[k] = [v]
    return new_dict