Modify output format
Add FastUnionFind class that uses quick union method