forrest gump in disjoint-set forest using namespace