Four men are standing,
Each with a hat.
Two hats are white,
Two hats are black.

Though they can't see their own,
They see other hats.
Each man can see forward.
No man can see back.

Betwixt three and four,
Stands a brick wall.
Thus man three and man four,
See no hats at all.

Each man knows the problem.
He knows where he stands.
There is no collusion,
No signals or plans.

Only one word is spoken,
One word by one man.
The color of his own hat, 
Which one of them can?