“i have five hats in my bag which you cannot see — two white and three black,” andrew said, “and i will put a hat on each of your heads.”
peter, james, and john stood on a single file, one in front of the other — peter at the rear, james in the middle, and john in front. andrew put a hat on each of their heads and said, “can you tell me the color of the hat i put on your head without looking at it?”
peter (who was at the rear) said, “i can see the color of james’ and john’s hats, but i don’t know the color of my hat!”
james (in the middle) said, “i can see the color of john’s hat, but i don’t know the color of my hat!”
john (in front) said, “hmm… i cannot see the color of peter’s and james’ hats, but i know the color of my hat!”
how did john — without looking — know? what is the color of john’s hat?