
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
In a prison, there are $n$ prisoners. The bored prison guards come up with a game where they place either a red or blue hat on each prisoner's head in the yard such that no one can see the color of their own hat. After the prisoners have had a good look at each other (each prisoner can see all the hats except their own), each of them must write down on a piece of paper the color of the hat on their head. If all of their answers are correct, they will be let out into the yard. What strategy should the prisoners agree upon to maximize their chances of being allowed out?

Present the answer in LaTex format: \boxed{Your answer}
user