Implement disjoint set forest and add test