A “good” word is any seven letter word consisting of letters from $\{A,B,C\}$ (some letters may be absent and some letter can be present more than once), with the restriction that $A$ cannot be followed by $B$, $B$ cannot be followed by $C$, and $C$ cannot be followed by $A$. How many good words are there?
I could find out $36$ good words. Is that the true answer?
The first letter can be either A, B, or C. For each of the subsequent ones the only choice is whether it is to be the same or different from the previous one (because in each case there's only one "different" letter allowed).
There's 3 ways to make the first choice and 2 ways to make each of the 6 remaining choices.
That ought to give 192 different combinations.