initialized WeightedQuickUnion UF data structure, which contains id and sz