|Spoiler Inside: Solution to Puzzle||SelectShow>|
According to Chris, there are 1449 combinations that are right.
There are 729 ways that each of the first two patterns can be formed and 81 ways for the third. However, there is overlap.
An abcb can be an abac if the abcb’s a = c. There are 81 ways.
Adjusting for the overlaps, this gives the following: