static <V> TreeNode<V> rotateRight(TreeNode<V> root,
                                             TreeNode<V> p) {
          TreeNode<V> l, pp, lr;
          if (p != null && (l = p.left) != null) {
            if ((lr = p.left = l.right) != null) {
              lr.parent = p;
            }
            if ((pp = l.parent = p.parent) == null) {
              (root = l).red = false;
            }
            else if (pp.right == p) {
              pp.right = l;
            }
            else {
              pp.left = l;
            }
              l.right = p;
              p.parent = l;
          }
          return root;
      }
static <V> TreeNode<V> rotateRight(TreeNode<V> root,
                                             TreeNode<V> p)