addition of a UnionFind structure. Addition of a readLong method in Main.
New version of the template: addition of a UnionFind structure. Addition of a readLong method in Main.