Both d and b have same RanksSetting the parent of b to dUpdate rank of d by child bItem b is in the set D{a=a, b=d, c=c, d=d, e=e}{a=1, b=1, c=1, d=2, e=1}Rank of d is greater than that of eSetting the parent of e to dItem e is in the set D{a=a, b=d, c=c, d=d, e=d}{a=1, b=1, c=1, d=2, e=1}Item a is in the set A{a=a, b=d, c=c, d=d, e=d}{a=1, b=1, c=1, d=2, e=1}Both a and e have same RanksSetting the parent of e to aUpdate rank of a by child eRank of a is greater than that of lSetting the parent of l to aRank of a is greater than that of iSetting the parent of i to aBoth d and b have same RanksSetting the parent of b to dUpdate rank of d by child bBoth d and a have same RanksSetting the parent of a to dUpdate rank of d by child a{a=d, b=d, d=d, e=a, i=a, l=a}{a=2, b=1, d=3, e=1, i=1, l=1}