Using sets instead of lists