We can take any word and rearrange all the letters to get another “word”. These new “words” may be nonsensical. For example, you can rearrange the letters in \(MATH\) to get \(MTHA\).
Nalan wants to rearrange all the letters in \(RED DOG\). However, she uses the following rules:
the letters \(R\), \(E\), and \(D\) cannot be adjacent to each other and in that order, and
the letters \(D\), \(O\), and \(G\) cannot be adjacent to each other and in that order.
For example, the “words” \(DOGRED\), \(DDOGRE\), \(GDREDO\), and \(DREDOG\) are examples of unacceptable words in this problem, but \(DROEGD\) is acceptable.
How many different arrangements of the letters in \(RED DOG\) can Nalan make if she follows these rules?