Bogganov I.I.
Given an infinite supply of white, blue, and red cubes. Any \N\ of them are arranged in a circle. A robot, starting at any point on the circle, moves clockwise and, until only one cube remains, repeatedly performs the following operation: it destroys the two nearest cubes in front of it and places a new cube behind it of the same color if the destroyed ones are the same, and of the third color if the destroyed ones are of different colors. We call a placement of cubes good if the color of the remaining cube at the end does not depend on the starting point of the robot. We call \ N \ lucky if for any choice of $\$ N \ cubes, all their placements are good. Find all lucky \ N \.
#