Four men are buried to their necks in the sand so that they can only look straight ahead as shown above. The man on the left is separated by an opaque barrier, he can't see anyone and no one can see him. The men on the right can not see behind them, they can only see the back of the head of the man in front. They know there are 2 black and 2 white hats distributed amoung them. They can't see the colour of their own hat. They are about to be shot unless one of them can correctly identify the hat he is wearing, a wrong choice will result in them being shot also. They are not allowed to communicate with each other in any way.Who works out what colour hat he is wearing?