If there are three, there are six arrangements: ABB, AAB, ABA, Baa, BBA and Bab, and the remaining one is selected at the head or tail, so *** 12.
If there are four and there are two letters between two C's, the possible combinations are (ab) and (ba), so * * * 2× A (3,3) =12.
In a word, ***24 arrangements.