[Python] recursion + @cache = DP
python\nclass Solution:\n    def stringCount(self, n: int) -> int:\n\n        @cache\n        def dp(i, l, e, t):\n            if i == n:\n                retur
```python\nclass Solution:\n    def stringCount(self, n: int) -> int:\n\n        @cache\n        def dp(i, l, e, t):\n            if i == n:\n                return int(l >= 1 and e >= 2 and t >= 1)\n\n            s = 0\n            for ch in ascii_lowercase:\n                if ch == \'l\' and l != 1:\n                    s += dp(i + 1, l + 1, e, t)\n                elif ch == \'e\' and e != 2:\n                    s += dp(i + 1, l, e + 1, t)\n                elif ch == \'t\' and t != 1:\n                    s += dp(i + 1, l, e, t + 1)\n                else:\n                    s += dp(i + 1, l, e, t)\n\n            return s % (10**9 + 7)\n\n        return dp(0, 0, 0, 0) % (10**9 + 7)\n```
['Dynamic Programming', 'Recursion', 'Python']