DP || Bitmasking || Easy to understand
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n#define ll long long \nint mod = 1e9+7;\nll dp[100001][16];\nll fn(int n,int i,int mask){\n\n    if(i >= n){\n        return mask == 15;\n    }\n    if(dp[i][mask] != -1)return dp[i][mask];\n    ll l = fn(n,i+1,mask|8);\n    ll e = (mask&4) ? (fn(n,i+1,mask|2)%mod) : (fn(n,i+1,mask|4)%mod);\n    ll t = fn(n,i+1,mask|1)%mod;\n\n    int other = ((ll)23*fn(n,i+1,mask))%mod;\n\n    return dp[i][mask] = (l+e+t+other)%mod;\n\n}\n    int stringCount(int n) {\n        memset(dp,-1,sizeof(dp));\n        return fn(n,0,0)%mod;\n    }\n};\n```
['Dynamic Programming', 'Bit Manipulation', 'Bitmask', 'C++']