Given dict with list values, create inverse: {"a":[1,2],"b":[2,3]} => {1:["a"],2:["a","b"],3:["b"]}
Implement this function:
def inverse_mapping(d: dict) -> dict:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: d.
Input
{'a': [1, 2], 'b': [2, 3]}
Output
{1: ['a'], 2: ['a', 'b'], 3: ['b']}