Three prisoners are assigned either a Red or Blue hat independently and with equal probability . Each prisoner can see the other two prisoners' hats, but cannot see their own. All three prisoners simultaneously make a call: each may either guess their own color (Red or Blue) or choose to PASS. The team wins if at least one prisoner guesses correctly and no prisoner guesses incorrectly. If anyone guesses wrong, or if all three pass, the team loses.
Your Task
Constraints
Examples In configuration (Red, Red, Blue), the prisoner seeing two Red hats guesses Blue and is correct. The other two see (Red, Blue) and pass. Team wins!