Stabilizing consensus with many opinions