prisoner and hat puzzle: four prisoners are arrested for a crime. Jailer gives all four men party hats. The jailer explains that there are two black hats and two white hats, that each prisoner is wearing one of the hats, and that each of the prisoners see only the hats in front of him but neither on himself nor behind him. The fourth man behind the screen can't see or be seen by any other prisoner.How prisoners guess the color of hats.