2. Let $x_{1}, x_{2}, \cdots, x_{n}$ be a set of numbers, each taking the value 1 or -1, and $x_{1} x_{2} + x_{2} x_{3} + \cdots + x_{n-1} x_{n} + x_{n} x_{1} = 0$. Then $\mathrm{i}^{n}$ equals $\qquad$ .
2. 1 Detailed Explanation: Let $y_{1}=x_{1} x_{2}, y_{2}=x_{2} x_{3}, \cdots, y_{n}=x_{n} x_{1}$, then the product of these $n$ numbers is $\left(x_{1} x_{2} \cdots x_{n}\right)^{2}=1, \therefore y_{1}, y_{2}$, $\cdots, y_{n}$, the number of values that are -1 is even. Also, from the sum of the $n$ numbers being 0, we know: the number of 1s and -1s in $y_{1}, y_{2}, \cdots, y_{n}$ are equal, hence $n$ is the sum of two equal even numbers, thus $n$ must be a multiple of 4, $n=4 k$, so $\mathrm{i}^{4 k}=1$.