
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
Consider a regular 2n-gon  $ P$ , $A_1,A_2,\cdots ,A_{2n}$  in the plane ,where  $n$  is a positive integer . We say that a point  $S$  on one of the sides of   $P$  can be seen from a point  $E$  that is external to  $P$  , if the line segment  $SE$  contains no other points that lie  on the sides of  $P$  except   $S$  .We color the sides of  $P$  in 3 different colors (ignore the vertices of  $P$ ,we consider them colorless), such that every side is colored in exactly one color, and each color is used at least once . Moreover  ,from every point in the plane external to  $P$  , points of most 2  different colors on  $P$  can be seen .Find the number of distinct such colorings of  $P$  (two colorings are considered distinct if at least one of sides is colored differently).

*Proposed by  Viktor Simjanoski, Macedonia*

JBMO 2017, Q4

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