DisjointSet class constructor was made more elegant :)