#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 105;
const int mod = 1000000007;
long long int dp[N][N][N];
long long int fib[N];
int main() {
  int n, m;
  string s;
  cin >> n >> m >> s;
  fib[0] = fib[1] = 2;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') dp[0][i][i] = 1;
    if (s[i] == '1') dp[1][i][i] = 1;
  }
  for (int i = 2; i <= m; i++) {
    fib[i] = fib[i - 1] * fib[i - 2] % mod;
    for (int a = 0; a < n; a++)
      for (int b = a; b < n; b++) {
        if (a == 0)
          dp[i][a][b] += fib[i - 1] * dp[i - 2][a][b] % mod;
        else
          dp[i][a][b] += dp[i - 2][a][b] % mod;
        if (b == n - 1)
          dp[i][a][b] += dp[i - 1][a][b] * fib[i - 2] % mod;
        else
          dp[i][a][b] += dp[i - 1][a][b] % mod;
        dp[i][a][b] %= mod;
        for (int c = a; c < b; c++) {
          dp[i][a][b] += dp[i - 1][a][c] * dp[i - 2][c + 1][b] % mod;
          dp[i][a][b] %= mod;
        }
      }
  }
  printf("%lld\n", dp[m][0][n - 1]);
}
