Merging disjoint sets. Four use-cases.