Kaguya spends her days enjoying parfaits and taking part in programming contests.
She has a string of length consisting of uppercase English letters. She may perform the following operation any number of times, including zero.
- Choose an integer () such that is one of
CPK, CKP, and PCK. Replace with any one of CPK, CKP, and PCK.
Find the number of distinct strings that can be obtained from by performing the operation any number of times, modulo .