Just a runnable solution
\nimpl Solution {\n    pub fn string_count(n: i32) -> i32 {\n        let mut dp = vec![vec![-1; 16]; n as usize + 1];\n        Self::func(n, 0, &mut dp)\n    }\
```\nimpl Solution {\n    pub fn string_count(n: i32) -> i32 {\n        let mut dp = vec![vec![-1; 16]; n as usize + 1];\n        Self::func(n, 0, &mut dp)\n    }\n\n    fn func(n: i32, mask: i32, dp: &mut Vec<Vec<i32>>) -> i32 {\n        const MOD: i32 = 1000000007;\n        if n == 0 {\n            if mask == 15 {\n                return 1;\n            }\n            return 0;\n        }\n        if dp[n as usize][mask as usize] != -1 {\n            return dp[n as usize][mask as usize];\n        }\n        let mut ans = 0;\n        for i in 0..26 {\n            if i == 4 {\n                if mask & 1 != 0 {\n                    ans = (ans + Self::func(n - 1, mask | 2, dp)) % MOD;\n                } else {\n                    ans = (ans + Self::func(n - 1, mask | 1, dp)) % MOD;\n                }\n            } else if i == 11 {\n                ans = (ans + Self::func(n - 1, mask | 4, dp)) % MOD;\n            } else if i == 19 {\n                ans = (ans + Self::func(n - 1, mask | 8, dp)) % MOD;\n            } else {\n                ans = (ans + Self::func(n - 1, mask, dp)) % MOD;\n            }\n        }\n        dp[n as usize][mask as usize] = ans;\n        ans\n    }\n}\n```
['Rust']