Use 3 colors to dye a 3*3 grid table. It is required that the 3 grids in the same row and column are dyed with different colors. How many different coloring methods are there in total?
用3种颜色把一个3*3的方格表染色，要求相同行和相同列的3个格所染的颜色互不相同，一共有多少种不同的染色法．
<gadget id="calculator">1 + 1</gadget>
<output>2</output>

<gadget id="calculator">3 * 2 * 1 * 2</gadget>
<output>12</output>

<result>12</result>