Sets and union-find