Adding check to QuickUnion in order to avoid assignement when two elements have the same root