<|im_start|>system
You are a helpful assistant. You first think about the reasoning process in the mind and then provide the user with the answer. You should try to truely solve the question by yourself without cheating.  <|im_end|>
<|im_start|>user
 A student has 7 reference books, including 2 Chinese books, 2 English books, and 3 math books. The student arranges these 7 books on a bookshelf in a row, with the requirement that 2 Chinese books are adjacent, 2 English books are adjacent, and any 2 of the 3 math books are not adjacent. Calculate the total number of different ways the books can be arranged. Show your work in <think> </think> tags. And return the final answer in <answer> </answer> tags.<|im_end|>
<|im_start|>assistant
Let me solve this step by step.
<think>
user
48
A student has 7 reference books, including 2 Chinese books, 2 English books, and 3 math books. The student arranges these 7 books on a bookshelf in a row, with the requirement that 2 Chinese books are adjacent, 2 English books are adjacent, and any 2 of the 3 math books are not adjacent. Calculate the total number of different ways the books can be arranged.
test