100% Python3 DP solution
Intuition\n Describe your first thoughts on how to solve this problem. \nSimilar as LC 123.\n# Approach\n Describe your approach to solving the problem. \n\n# C
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nSimilar as LC 123.\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:\n    def stringCount(self, n: int) -> int:\n        # similar as LC123\n        # DEFINE a dp(msk)\n        #T0L0E0, T0L0E1, T0L0E2\n        #T0L1E0, T0L1E1, T0L1E2\n        #T1L0E0, T1L0E1, T1L0E2\n        #T1L1E0, T1L1E1, T1L1E2\n\n        dp = collections.defaultdict(int)\n        dp[0] = 23\n        dp[100] = dp[10] = dp[1] = 1\n        \n        MOD = 10 ** 9 + 7\n\n        for _ in range(1,n):\n            new = collections.defaultdict(int)\n\n            new[0] = dp[0] * 23 % MOD\n            new[1] = (dp[1] * 23 + dp[0]) % MOD\n            new[2] = (dp[2] * 24 + dp[1]) % MOD\n            new[10] = (dp[10] * 24 + dp[0]) % MOD\n            new[11] = (dp[11] * 24 + dp[1] + dp[10]) % MOD\n            new[12] = (dp[12] * 25 + dp[11] + dp[2]) % MOD\n            new[100] = (dp[100] * 24 + dp[0]) % MOD\n            new[101] = (dp[101] * 24 + dp[100] + dp[1]) % MOD\n            new[102] = (dp[102] * 25 + dp[101] + dp[2]) % MOD\n            new[110] = (dp[110] * 25 + dp[10] + dp[100]) % MOD\n            new[111] = (dp[111] * 25 + dp[11] + dp[101] + dp[110]) % MOD\n            new[112] = (dp[112] * 26 + dp[12] + dp[102] + dp[111]) % MOD\n\n            dp = new\n\n        return dp[112] % MOD\n\n```
['Python3']