A more sophisticated way to do it:

out = {}
for key, val in inp.items():
    out.setdefault(val, []).append(key)