Beneficial effect of competition on product diversity