This one's fun:There's an evil queen with a plan to execute 50 prisoners. She gathers them together and announces the plan:The prisoners will line up, all facing one direction so the one in back can see the other 49, and the one at the front can see no one. Starting at the back, each prisoner will be given a white or black hat at random (there could be 50 black hats, 50 white hats, or 25 of each). Each prisoner will be able to see the hats of the prisoners in front of him, but not his own hat or the hats of those behind him.After they all have hats, the queen will start at the back (with th