Given an $n \times n (n \geqslant 2)$ grid, fill it with -1 and +1. The cell at the intersection of the $i$-th row and the $j$-th column is called $(i, j)$, and the cells $(i-1, j)$, $(i+1, j)$, $(i, j-1)$, and $(i, j+1)$ are called the neighbors of $(i, j)$. The addition and subtraction here are performed modulo $n$. A move is defined as replacing the number in each cell $(i, j)$ with the product of its four neighbors. Find all $n$ such that for any $n \times n$ grid, a finite number of moves can make all the numbers in the grid +1.

---

The translation preserves the original text's formatting and structure.
All $n$ are $n=2^{k}(k \in \mathbf{N})$.
First, we prove that $n=2^{k}(k \in \mathbf{N})$ satisfies the condition.
When $k=0$, the proposition is obviously true.
When $k \geqslant 1$, by $(-1)^{2}=1$, if a number in a cell appears an even number of times in the operation, it can be ignored.

Now consider the situation after each change when $n=2^{k}$: Suppose the number in the $(i, j)$-th cell at the beginning is $x(i, j)$, and define $x_{k}(i, j)$ as the number in the $(i, j)$-th cell after $k$ transformations. Then:
After one transformation
$x_{1}(i, j)$
$=x(i-1, j) x(i+1, j) x(i, j-1) x(i, j+1)$,
After two transformations
$x_{2}(i, j)$
$=x_{1}(i-1, j) x_{1}(i+1, j) x_{1}(i, j-1) x_{1}(i, j+1)$ $=x(i-2, j) x(i, j) x(i-1, j-1) x(i-1, j+1)$. $x(i, j) x(i+2, j) x(i+1, j-1) x(i+1, j+1)$. $x(i-1, j-1) x(i+1, j-1) x(i, j-2)$. $x(i, j) x(i-1, j+1) x(i+1, j+1) x(i, j)$. $x(i, j+2)$.
$=x^{4}(i, j) x^{2}(i-1, j-1) x^{2}(i-1, j+1)$. $x^{2}(i+1, j-1) x^{2}(i+1, j+1) x(i, j-2)$. $x(i, j+2) x(i-2, j) x(i+2, j)$ $=x(i, j-2) x(i, j+2) x(i-2, j) x(i+2, j)$. Hence $x_{2}(i, j)$
$$
\begin{aligned}
= & x(i, j-2) x(i, j+2) . \\
& x(i-2, j) x(i+2, j) .
\end{aligned}
$$

Similarly, it is easy to prove by mathematical induction that
$$
\begin{array}{l}
x_{s}(i, j) \\
=x\left(i, j-2^{s}\right) x\left(i, j+2^{s}\right) . \\
\quad x\left(i-2^{s}, j\right) x\left(i+2^{s}, j\right) .
\end{array}
$$

In particular, take $s=k-1$, at this point,
$$
\begin{array}{l} 
x_{k-1}(i, j) \\
= x\left(i, j-2^{k-1}\right) x\left(i, j+2^{k-1}\right) \\
x\left(i-2^{k-1}, j\right) x\left(i+2^{k-1}, j\right) . \\
\text { By }\left(i+2^{k-1}\right)-\left(i-2^{k-1}\right) \\
= 2^{k} \equiv 0\left(\bmod 2^{k}\right),
\end{array}
$$

we know $x\left(i+2^{k-1}, j\right)=x\left(i-2^{k-1}, j\right)$.
Similarly, $x\left(i, j+2^{k-1}\right)=x\left(i, j-2^{k-1}\right)$.
$$
\begin{aligned}
\text { Hence } & x_{k}(i, j) \\
= & x^{2}\left(i-2^{k-1}, j\right) x^{2}\left(i, j-2^{k-1}\right) \\
= & 1 .
\end{aligned}
$$

Thus, after $k-1$ transformations, all the numbers in the cells are +1, i.e., $n=2^{k}$ satisfies the condition.

Next, we prove that when $n \neq 2^{k}$, there must exist a way to fill the grid such that it cannot be transformed into all +1. First, consider the case of odd numbers.
Let $n=2 k+1\left(k \in \mathbf{Z}_{+}\right)$, construct a row
$$
\text { “ } \underbrace{-1,-1}_{k \uparrow}, \cdots,-1,1, \underbrace{-1,-1}_{k \uparrow}, \cdots,-1 \text { ”, }
$$

and then these $2 k+1$ rows are all the above arrangement, at this point, we only need to discuss the changes in one row.

Since each row is the same, for any $(i, j)$, we have
$$
x(i-1, j)=x(i+1, j),
$$

so each transformation of $x(i, j)$ only depends on $x(i, j-1)$ and $x(i, j+1)$.
The problem is reduced to the row
$$
\text { “ } \underbrace{-1,-1}_{k \uparrow}, \cdots,-1,1, \underbrace{-1}_{k \uparrow}, \cdots,-1 \text { ” }
$$

where each operation changes the $i$-th cell to the product of the $(i+1)$-th and $(i-1)$-th cells (under modulo $n$), to prove that no matter how many operations are performed, it cannot be transformed into a row of all +1.

Assume by contradiction that there exists a $t$ such that after $t$ operations, this row becomes all +1, and let $t$ be the smallest, then $t \geqslant 2$, and in the $(t-1)$-th transformation, there must be a -1, without loss of generality, assume it is the 1st position, then by the definition of the transformation, the 3rd, 5th, ..., $(2 k+1)$-th positions are all -1, and the $(2 k+1)$-th position being -1 and the 1st position being +1 after the transformation implies the 2nd position is -1, thus the 4th, 6th, ..., $(2 k)$-th positions are all -1, i.e., in the $(t-1)$-th operation, it becomes all -1.

This indicates that in the $(t-2)$-th operation, every two adjacent positions in this row are different, without loss of generality, assume the 1st position is +1, the 2nd position is -1, the 3rd position is +1, ..., the $(2 k)$-th position is -1, the $(2 k+1)$-th position is +1, at this point, the $(2 k+1)$-th position is the same as the 1st position, which is a contradiction.

Thus, the assumption is false, i.e., this row cannot be transformed into all +1 no matter how many operations are performed.

Therefore, when $n=2 k+1\left(k \in \mathbf{Z}_{+}\right)$, it does not satisfy the condition.

For $n \neq 2^{k}$ and $n$ is even, then there must be $n=2^{s} t$ (where $t$ is an odd number greater than 1). At this point, arrange the row when $n=t$ repeatedly $2^{s}$ times, then this row cannot be transformed into all +1, i.e., it proves that $n \neq 2^{k}$ does not satisfy the condition.
In summary, all $n$ are $n=2^{k}(k \in \mathbf{N})$.