There are 10 people in a row, numbered 1 to 10, where 10 is behind everyone. Each hat can be red, blue or green.
Person 10 speaks first and sees the hats of the 9 people in front of him; the 9 sees 8; and so on. Nobody sees their own hat or those left behind.
Taking turns, each person must say a single word out loud: “red,” “blue,” or “green.” They can't add anything more. If someone guesses the color of his hat correctly, he survives; If you fail, you die.
Before starting you can agree on a strategy. How many lives can you guarantee at least?