c++ solution
\nclass Solution\n{\n    public:\n        int mod = 1e9 + 7;\n    long long dp[100005][2][2][2][2];\n    long long find(int n, int index, int a, int b, int c, i
```\nclass Solution\n{\n    public:\n        int mod = 1e9 + 7;\n    long long dp[100005][2][2][2][2];\n    long long find(int n, int index, int a, int b, int c, int d)\n    {\n        if (index == n)\n        {\n\t\t// a->l\n\t\t// b->e\n\t\t// c->e\n\t\t// d->t\n            return a == 1 && b == 1 && c == 1 && d == 1;\n        }\n        if (dp[index][a][b][c][d] != -1)\n        {\n            return dp[index][a][b][c][d] % mod;\n        }\n        long long ans = 0;\n        for (char ch = \'a\'; ch <= \'z\'; ch++)\n        {\n            if (ch == \'l\' && a == 0)\n            {\n                ans += find(n, index + 1, 1, b, c, d);\n            }\n            else if (ch == \'e\' && b == 0)\n            {\n                ans += find(n, index + 1, a, 1, c, d);\n            }\n            else if (ch == \'e\' && c == 0)\n            {\n                ans += find(n, index + 1, a, b, 1, d);\n            }\n            else if (ch == \'t\' && d == 0)\n            {\n                ans += find(n, index + 1, a, b, c, 1);\n            }\n            else\n            {\n                ans += find(n, index + 1, a, b, c, d);\n            }\n        }\n        return dp[index][a][b][c][d] = ans % mod;\n    }\n    int stringCount(int n)\n    {\n        memset(dp, -1, sizeof(dp));\n        return find(n, 0, 0, 0, 0, 0) % mod;\n    }\n};\n```
['Dynamic Programming', 'C', 'C++']