union_find is a dynamic structure.