Moving from to , 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.
Solved by gpt-5.6-sol high.
Codex Wiki