6. There is a parking lot with 8 parking spaces as shown in the figure, to be painted with red, yellow, blue, and brown paints. It is stipulated that different colors should be used in the same row and the same column. The number of different painting methods is $\qquad$.


6. 216 Detailed Explanation: The coloring is done in two steps. First, color the parking spaces numbered 1, 2, 3, 4, which can be done in $A_{4}^{4}$ ways. Then, color the parking spaces numbered 5, 6, 7, 8, which is a derangement problem of 4 elements, with 9 methods. Therefore, there are a total of $9 A_{4}^{4}=216$ ways.