Now the faculty announces that he had made sure that the competition is extremely fair to all three of them. He also gives them a hint that at least one of them is wearing a red hat. Now the first one who is able to deduce his own hat color will be awarded the most intelligent student of all award. After a few minutes, one of them raises his hand and is able to deduce the color correctly.
How?