The Magician calls in three wise men and tells them to all close their eyes. While their eyes are closed, he goes around and puts a hat on each of them.
"I put a blue or white hat on each of you," he says. "I won't tell you what color each hat is, but you must know that i had 3 blue hats and 2 white hats."
"Now open your eyes," he continues. "You may not communicate with each other at all. Within one hour, one of you must call out the color of your own hat."
The wise men open their eyes and look at the other mens' hats. They stand there for almost the whole hour in silence, thinking. Just as time is about to run out, all three men figure out the color of their own hats and yell the colors out at the same time.
You can assume that all three men are perfect logicians, that they know that the others are perfect logicians, and that they all think at the same speed.
What colors are the three men's hats?