Easy Recursion
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    const int MOD = 1e9+7;\n    int dp[100001][2][3][2];\n    int dfs(int i,int l,int e,int t,int n){\n        if(i == n){\n            if(l == 1 && e == 2 && t == 1) return 1;\n            return 0;\n        }\n        if(dp[i][l][e][t] != -1) return dp[i][l][e][t];\n        int ans = 0;\n        for(int j=0;j<26;j++){\n            if(j + \'a\' == \'l\')      ans = (ans + dfs(i+1,1,e,t,n))%MOD;\n            else if(j + \'a\' == \'e\') ans = (ans + dfs(i+1,l,min(e+1,2),t,n))%MOD;\n            else if(j + \'a\' == \'t\') ans = (ans + dfs(i+1,l,e,1,n))%MOD;\n            else{\n                ans = (ans + dfs(i+1,l,e,t,n))%MOD;\n            }\n        }\n        return dp[i][l][e][t] = ans;\n    }\n    int stringCount(int n) {\n        memset(dp,-1,sizeof(dp));\n        return dfs(0,0,0,0,n);\n    }\n};\n```
['C++']