#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 2;
const long long M = 1e9 + 7;
long long pw2[N];
long long pw(long long a, long long p) {
  if (!p) return 1;
  long long ret = pw(a, p >> 1);
  ret = (ret * ret) % M;
  if (p & 1LL) ret = (ret * a) % M;
  return ret;
}
long long comb[N];
void prec() {
  pw2[0] = 1;
  for (int i = 1; i < N; ++i) pw2[i] = (2LL * pw2[i - 1]) % M;
  comb[0] = 2;
  comb[1] = 2;
  for (int i = 2; i < N; ++i) {
    comb[i] = (comb[i - 1] * comb[i - 2]) % M;
  }
}
long long dp[N][N][N];
long long pref[N][N];
long long suff[N][N];
long long all[N];
string s;
int n, x;
void sm(long long &a, long long b) { a = (a + b) % M; }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  prec();
  cin >> n >> x;
  cin >> s;
  for (int i = 0; i < n; ++i) dp[s[i] - '0'][i][i] = 1;
  if (n == 1) {
    all[s[0] - '0'] = 1;
  } else {
    pref[s[0] - '0'][0] = 1;
    suff[s[n - 1] - '0'][n - 1] = 1;
  }
  for (int i = 2; i <= x; ++i) {
    for (int l = 0; l < n; ++l) {
      for (int r = l; r < n; ++r) {
        dp[i][l][r] = dp[i - 1][l][r];
        sm(dp[i][l][r], dp[i - 2][l][r]);
        for (int k = l; k < r; ++k) {
          sm(dp[i][l][r], (dp[i - 1][l][k] * dp[i - 2][k + 1][r]) % M);
        }
      }
    }
    for (int j = 0; j < n - 1; ++j) {
      pref[i][j] = (pref[i - 2][j] * comb[i - 1]) % M;
    }
    for (int j = 0; j < n - 1; ++j) {
      sm(pref[i][j], pref[i - 1][j]);
      for (int k = 0; k <= j - 1; ++k) {
        sm(pref[i][j], (pref[i - 1][k] * dp[i - 2][k + 1][j]) % M);
      }
    }
    for (int j = n - 1; j > 0; --j) {
      suff[i][j] = (suff[i - 1][j] * comb[i - 2]) % M;
    }
    for (int j = n - 1; j > 0; --j) {
      sm(suff[i][j], suff[i - 2][j]);
      for (int k = n - 1; k > j; --k) {
        sm(suff[i][j], (suff[i - 2][k] * dp[i - 1][j][k - 1]) % M);
      }
    }
    all[i] =
        ((all[i - 2] * comb[i - 1]) % M + (comb[i - 2] * all[i - 1]) % M) % M;
    for (int j = 0; j < n - 1; ++j) {
      sm(all[i], (pref[i - 1][j] * suff[i - 2][j + 1]) % M);
    }
  }
  if (0)
    for (int i = 0; i <= x; ++i) {
      for (int l = 0; l < n; ++l) {
        for (int r = l; r < n; ++r) {
          cout << "dp[" << i << "][" << l << "][" << r << "] = " << dp[i][l][r]
               << endl;
        }
      }
    }
  if (0)
    for (int i = 0; i <= x; ++i) {
      for (int j = 0; j < n - 1; ++j) {
        cout << "pref[" << i << "][" << j << "] = " << pref[i][j] << endl;
      }
    }
  cout << all[x] << endl;
}
