Solution
= Solution
Moving from $A_1$ to $A_n$, the colour changes an odd number of times because the endpoints have opposite colours: every change toggles the current colour, while every nonchange preserves it. Formally, encode red and green by zero and one; the sum modulo two of adjacent differences is the endpoint difference, which is one.