AVL tree working as rank tree, Union-Find: unite and find working