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$ .