I have a Python set
A = {34, 4, 7, 39, 40, 13, 18, 20}
and a dictionary
B = 4: [6, 34, 39], 7: [18, 34], 13: [6, 18, 34], 18: [7,