Python. LRU cache....
\nclass Solution:\n    def countTexts(self, x: str) -> int:\n        l=len(x)\n        @lru_cache(None)\n        def f(i):\n            if i==l:return 1\n      
```\nclass Solution:\n    def countTexts(self, x: str) -> int:\n        l=len(x)\n        @lru_cache(None)\n        def f(i):\n            if i==l:return 1\n            ans=0\n            for j in range(i,i+(4 if x[i] in \'97\' else 3)):\n                    if j<l and x[j]==x[i]:\n                        ans+=f(j+1)\n                    else:\n                        break\n            return ans%(10**9+7)\n        return f(0)\n```
[]