The master logician explains that a bell will be rung at regular intervals and the moment when a logician knows the color of his hat, he will leave on the next bell. If anyone leaves at the wrong bell, he will be disqualified and sent home.
All of them are assured of one thing that the puzzle will not be impossible for anyone of them. How will they manage the situation?