func_code_string: #include <bits/stdc++.h>   using namespace std;   typedef long long lo;   typedef vector<lo> vl;   typedef vector<lo> vll;   typedef vector<vl> vvl;   template <typename T>   ostream &operator<<(ostream &o, vector<T> v) {     if (v.size() > 0) o << v[0];     for (unsigned i = 1; i < v.size(); i++) o <<     << v[i];     return o <<   n ;   }   template <typename U, typename V>   ostream &operator<<(ostream &o, pair<U, V> p) {     return o <<  (  << p.first <<  ,   << p.second <<  )  ;   }   template <typename T>   istream &operator>>(istream &in, vector<T> &v) {     for (unsigned i = 0; i < v.size(); i++) in >> v[i];     return in;   }   template <typename T>   istream &operator>>(istream &in, pair<T, T> &p) {     in >> p.first;     in >> p.second;     return in;   }   string s;   lo len[203][2];   lo dp[203][203][203][2];   lo cal(string &t) {     for (lo i = t.size(); i > 0; i--) {       if (s.substr(0, i) == t.substr(t.size() - i, i)) return i;     }     return 0;   }   void add(lo &a, lo b) {     a += b;     if (a >= 1000000007) a -= 1000000007;     if (a < 0) a += 1000000007;   }   int main() {     std::ios::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cout.precision(20);     lo n, ssz;     cin >> n >> s;     ssz = s.size();     if (s[0] ==  ( )       len[0][0] = 1;     else       len[0][1] = 1;     string pref;     for (lo i = (0); i < (lo)ssz; i++) {       pref += s[i];       pref +=  ( ;       len[i + 1][0] = cal(pref);       pref.pop_back();       pref +=  ) ;       len[i + 1][1] = cal(pref);       pref.pop_back();     }     dp[0][0][0][0] = 1;     for (lo i = (0); i < (lo)2 * n; i++) {       for (lo(j) = 0; (j) < (n + 1); (j)++) {         for (lo(pos) = 0; (pos) < (ssz + 1); (pos)++) {           for (lo(f) = 0; (f) < (2); (f)++) {             if (dp[i][j][pos][f] == 0) continue;             if (j + 1 <= n)               add(dp[i + 1][j + 1][len[pos][0]][f | (len[pos][0] == ssz)],                   dp[i][j][pos][f]);             if (j > 0)               add(dp[i + 1][j - 1][len[pos][1]][f | (len[pos][1] == ssz)],                   dp[i][j][pos][f]);           }         }       }     }     lo ans = 0;     for (lo i = (0); i < (lo)ssz + 1; i++) add(ans, dp[2 * n][0][i][1]);     cout << ans <<   n ;     return 0;   }   