## Task 1.

To each vertex of a regular $n$-gon, a non-negative real number is assigned such that the sum of all assigned numbers is 1. Let $A$ be the sum of the products of the numbers assigned to every three consecutive vertices. Determine the maximum possible value of $A$ and find all cases in which this value is achieved if
a) $n=4$,
b) $n=6$.