Replacing the greatest element from RHS.