func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long mod = 1e9 + 7;   const int maxn = 205;   int fail[maxn + 5];   int nxt[maxn + 5][maxn + 5];   long long dp[maxn + 5][maxn + 5][maxn + 5];   char s[maxn + 5];   int n, len;   void Get_fail() {     fail[0] = -1;     int j = 0, k = -1;     while (j <= len) {       if (k == -1 || s[j] == s[k])         fail[++j] = ++k;       else         k = fail[k];     }   }   void Get_nxt() {     for (int i = 0; i <= len; i++) {       for (int j = 0; j <= 1; j++) {         if (i == len)           nxt[i + 1][j] = len;         else {           char ch = (j == 0 ?  )  :  ( );           int r = i;           while (r >= 0 && s[r] != ch) r = fail[r];           if (s[r] == ch || r == -1) r++;           nxt[i + 1][j] = r;         }       }     }   }   long long DP() {     dp[0][0][0] = 1;     for (int i = 0; i <= 2 * n; i++) {       for (int j = 0; j <= min(i, n); j++) {         for (int k = 0; k <= len; k++) {           for (int p = 0; p <= 1; p++) {             if (dp[i][j][k] == 0) continue;             int nj = j - (p == 0 ? 1 : -1);             if (nj >= 0 && nj <= n) {               int nk = nxt[k + 1][p];               dp[i + 1][nj][nk] = (dp[i + 1][nj][nk] + dp[i][j][k]) % mod;             }           }         }       }     }     return dp[2 * n][0][len];   }   void Init() {     len = strlen(s);     Get_fail();     Get_nxt();   }   int main() {     scanf( %d , &n);     scanf( %s , s);     Init();     printf( %lld n , DP());     return 0;   }   