Solution:
The first step that they will take will be a leap of logic. What it means is that they will deduce that every color must appear twice at least. Why? Because the master logician has assured them that the puzzle will not be impossible for anyone of them. And if a color appears only once in the circle, the person wearing it will have no clue about that color which will not be fair for him.
Then the logicians will follow the same and look for all the colors of hats in the circle. If one of them sees a color just once, he can safely assume that he is also wearing the hat of the same color as by leap of logic, no color can appear just once. Thus when the bell is rung, he will leave.
In the similar fashion, if anyone sees another color just once, he can determine that he is wearing the hat of the same color and will leave when the bell rings or will be disqualified and sent home. Unvaryingly, if a color is seen twice, they will be eliminated after the first bell. Hence, there must be at least three hats of any of the remaining color.
Assume that you are sitting in the circle and you don’t see a color once but see it twice. Then if they were the only two hats of the same color, the logicians must have left at the first bell already. But they did not. Which means that there are three hats of that color and you are wearing one. Thus you will leave after the second bell.