here is a logic problem for you all
You are in prison with Barry & Albert. The three of you are in a line looking straight ahead.
You are in front, then Barry, then Albert.
A guard has 3 black & 2 white hats. he randomly puts one on each of your heads.
Albert can see your hat & Barry's, Barry can see yours and you can see no ones.
None of you know what hat is on your own head.
The guard says, “If anyone can tell me 100% certainty the colour of your hat,
uttering no one else's, you can all go free.”
He tells Albert to answer first. Albert is very honest and intelligent person,
but he says, “I dont know, there is no way of knowing for sure.”
The Guard then asks Barry. Barry is also intelligent and rational, but he also cannot tell.
He comes to you, and you say the colour of your hat with 100% certainty.
The guard has no choice but to release all 3 of you.
What colour hat were you wearing and how did you know?