Implement stack popping the most frequently added item.