Shown above are four men buried up to their necks in the ground.
They can't move they can only look forward. Between A and B is a brick wall which is completely opaque (they absolutely can't see through it). They are all aware that each of them is wearing a hat, and that two of them are wearing a black hat, and two of them are wearing a white hat. They don't know what color THEY are wearing. However, each of them DOES know where the other three are buried.
In order to avoid being executed, one of them must call out to the executioner the color of their hat. If they get it wrong, everyone will be shot. They can't talk to each other and have only 10 minutes to figure it out.
After 60 seconds, one of them calls out.
QUESTION: Which one of them calls out? How can he be certain he knows the color of his hat?