Easy Python solution using Sets and Set theory


#1

class Solution:
def solve(self, A, B, C):
A.sort()
B.sort()
C.sort()
a = set(A)
b = set(B)
c = set©
p = a.intersection(b)
q = b.intersection©
r = c.intersection(a)
z = sorted(list(p.union(q).union®))
return z