Puzzle me this

There are four men standing as shown, facing in the direction of their respective arrows. Each one has, on their heads, a black or a white hat; they do not know the colour of their own hat, and are only able to see the hats of the men in their direct line of vision. So for example, the man on the top step can see that the two men below him have a white and a black hat respectively, but nothing else.

All men are told that between them, they have two black hats and two white hats, but they do not know the order in which they have been placed on their heads.


They are not allowed to speak to each other, or move.

Sadistic gunman tells them that one of them - any one - has to deduce the colour of their own hat and shout it out to him. If that person gets it wrong, he will be shot. If none of them say anything within ten minutes, they will all be shot. If someone gets it right, they will all walk free.

Shout, if you dare! And, of course, if you figure it out.