There are four cardboards with A, B, C, and D written on them respectively. Now arrange the four cardboards at positions 1, 2, 3, and 4. It is required that A is not in No. 1, B is not in No. 2, C is not in No. 3, and D is not in No. 1. If it is not in number 4, how many arrangements are there in total?
有四块纸板分别写有A、B、C、D，现将四块纸板在1、2、3、4号位置进行排列，要求A不在1号，B不在2号，C不在3号，D不在4号，那么一共有多少排列方式．
<gadget id="calculator">1 + 2</gadget>
<output>3</output>

<gadget id="calculator">3 * 3</gadget>
<output>9</output>

<result>9</result>