12. (10 points) Place rectangular blocks labeled with +1 and -1 in a $10 \times n$ grid, so that the product of the numbers in each column and each row is positive. What is the minimum value of $n$?
【Analysis】From the problem, we can deduce: the number of -1s in each row and each column is even, so the total number of 1s in the entire grid is even, and the number of -1s is the number of rectangular blocks. Therefore, we can assume there are $2m$ rectangular blocks. Each rectangular block occupies 2 cells. When the rectangular blocks are fully placed, $10n=4m, 5n=2m$, so $n=2k, m=5k, k=1,2$, $3, \cdots$ Then, starting from the smallest 2, we can discuss and find the answer that meets the requirements.

【Solution】Solution: The number of -1s in each row and each column is even, so the total number of -1s in the entire grid is even, and the number of -1s is the number of rectangular blocks. Therefore, we can assume there are $2m$ rectangular blocks. Each rectangular block occupies 2 cells.

When the rectangular blocks are fully placed, $10n=4m, 5n=2m$, so $n=2k, m=5k, k=1,2,3, \cdots$ The smallest $n=2$, but if $n=2, m=5$, the rectangular blocks cannot be placed horizontally, and placing 5 rectangular blocks vertically, each column will have exactly 5 -1s, which cannot meet the requirement. If $n=4, m=10$, as shown in the figure, each rectangular block can be placed horizontally with +1 on the left and -1 on the right. Answer: The minimum value of $n$ is 4.