#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXLEN = 100;
const int MAXFIB = 100;
const int MOD = 1000000007;
int slen, fibidx;
char s[MAXLEN + 1];
int cnt[MAXFIB + 1];
int prefcnt[MAXFIB + 1][MAXLEN][MAXLEN];
int suffcnt[MAXFIB + 1][MAXLEN][MAXLEN];
int eqcnt[MAXFIB + 1][MAXLEN][MAXLEN];
int scnt[MAXFIB + 1];
void inc(int &a, long long b) { a = (a + b) % MOD; }
void run() {
  scanf("%d%d%s", &slen, &fibidx, &s);
  memset(prefcnt, 0, sizeof(prefcnt));
  memset(suffcnt, 0, sizeof(suffcnt));
  memset(eqcnt, 0, sizeof(eqcnt));
  memset(scnt, 0, sizeof(scnt));
  for (int x = (0); x < (2); ++x) {
    cnt[x] = 2;
    for (int i = (0); i < (slen); ++i)
      if (s[i] == '0' + x)
        prefcnt[x][i][i] = suffcnt[x][i][i] = eqcnt[x][i][i] = 1;
    if (slen == 1 && s[0] == '0' + x) scnt[x] = 1;
  }
  for (int x = (2); x <= (fibidx); ++x) {
    cnt[x] = (long long)cnt[x - 1] * cnt[x - 2] % MOD;
    for (int i = (0); i < (slen); ++i)
      for (int j = (i); j < (slen); ++j) {
        inc(prefcnt[x][i][j], (long long)prefcnt[x - 1][i][j] * cnt[x - 2]);
        for (int k = (i); k < (j); ++k)
          inc(prefcnt[x][i][j],
              (long long)eqcnt[x - 1][i][k] * prefcnt[x - 2][k + 1][j]);
        inc(prefcnt[x][i][j], prefcnt[x - 2][i][j]);
        inc(suffcnt[x][i][j], (long long)cnt[x - 1] * suffcnt[x - 2][i][j]);
        for (int k = (i); k < (j); ++k)
          inc(suffcnt[x][i][j],
              (long long)suffcnt[x - 1][i][k] * eqcnt[x - 2][k + 1][j]);
        inc(suffcnt[x][i][j], suffcnt[x - 1][i][j]);
        inc(eqcnt[x][i][j], eqcnt[x - 1][i][j]);
        for (int k = (i); k < (j); ++k)
          inc(eqcnt[x][i][j],
              (long long)eqcnt[x - 1][i][k] * eqcnt[x - 2][k + 1][j]);
        inc(eqcnt[x][i][j], eqcnt[x - 2][i][j]);
      }
    inc(scnt[x], (long long)scnt[x - 1] * cnt[x - 2]);
    inc(scnt[x], (long long)cnt[x - 1] * scnt[x - 2]);
    for (int i = (0); i < (slen - 1); ++i)
      inc(scnt[x],
          (long long)suffcnt[x - 1][0][i] * prefcnt[x - 2][i + 1][slen - 1]);
  }
  printf("%d\n", scnt[fibidx]);
}
int main() {
  run();
  return 0;
}
