Problem: You are given a binary string s (each character of this string is either 0 or 1).

Let's denote the cost of string t as the number of occurences of s in t. For example, if s is 11 and t is 111011, then the cost of t is 3.

Let's also denote the Fibonacci strings sequence as follows:

  * F(0) is 0;
  * F(1) is 1;
  * F(i) = F(i - 1) + F(i - 2) if i > 1, where  +  means the concatenation of two strings.



Your task is to calculate the sum of costs of all subsequences of the string F(x). Since answer may be large, calculate it modulo 109 + 7.

Input

The first line contains two integers n and x (1 ≤ n ≤ 100, 0 ≤ x ≤ 100) — the length of s and the index of a Fibonacci string you are interested in, respectively.

The second line contains s — a string consisting of n characters. Each of these characters is either 0 or 1.

Output

Print the only integer — the sum of costs of all subsequences of the string F(x), taken modulo 109 + 7. 

Examples

Input

2 4
11


Output

14


Input

10 100
1010101010


Output

553403224

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
char s[105];
int jump[105];
int n, x;
vector<string> fibs;
vector<long long> lengths;
long long powmod(long long a, int e) {
  long long ans = 1;
  while (e) {
    if (e & 1) ans = (ans * a) % mod;
    a = (a * a) % mod;
    e >>= 1;
  }
  return ans;
}
vector<vector<long long> > createCount(int idx) {
  vector<vector<long long> > result(n);
  for (int i = 0; i < n; ++i) {
    auto& ans = result[i];
    ans.resize(n);
    vector<long long> tans(n);
    ans[i] = 1;
    for (int j = 0; j < fibs[idx].size(); ++j) {
      fill(tans.begin(), tans.end(), 0);
      for (int k = 0; k < n; ++k) {
        int x = k;
        while (x > -1 && (s[x] != fibs[idx][j] || x == n - 1)) x = jump[x];
        tans[x + 1] = (tans[x + 1] + ans[k]) % mod;
      }
      for (int k = 0; k < n; ++k) tans[k] = (tans[k] + ans[k]) % mod;
      ans = tans;
    }
  }
  return result;
}
vector<long long> createAns(int idx) {
  vector<long long> ans(n + 1);
  ans[n] = 1;
  vector<long long> tans(n + 1);
  for (int i = lengths[idx] - 1; i >= 0; --i) {
    fill(tans.begin(), tans.end(), 0);
    for (int j = 0; j < n; ++j) {
      auto x = j;
      if (x == n - 1 && fibs[idx][i] == s[x]) {
        tans[j] = (tans[j] + ans[n]) % mod;
        x = jump[x];
      }
      while (x > -1 && fibs[idx][i] != s[x]) x = jump[x];
      tans[j] = (tans[j] + ans[x + 1]) % mod;
    }
    for (int j = 0; j < n; ++j) tans[j] = (tans[j] + ans[j]) % mod;
    tans[n] = powmod(2, lengths[idx] - i);
    ans = tans;
  }
  return ans;
}
int main(void) {
  scanf("%d%d\n%s", &n, &x, s);
  fibs = {"0", "1"};
  lengths = {1, 1};
  fibs.reserve(x + 1);
  lengths.reserve(x + 1);
  for (int i = 2; i <= x; ++i) {
    lengths.push_back((lengths[i - 1] + lengths[i - 2]) % (mod - 1));
  }
  int idx = 0;
  while (lengths[idx] < n) ++idx;
  for (int i = 2; i <= idx + 1; ++i) {
    fibs.push_back(fibs[i - 1] + fibs[i - 2]);
  }
  jump[0] = -1;
  for (int i = 1, j = 0; i < n; ++j, ++i, jump[i] = j) {
    while (j > -1 && s[i] != s[j]) j = jump[j];
  }
  if (x == idx) return !printf("%lld\n", createAns(idx)[0]);
  if (x < idx) return !printf("0\n");
  vector<vector<long long> > count[3];
  vector<long long> ans[3];
  for (int i = 0; i < 3; ++i) {
    ans[i].resize(n);
    count[i].resize(n);
    for (int j = 0; j < n; ++j) count[i][j].resize(n);
  }
  for (int i = 0; i < 2; ++i) {
    count[i] = createCount(idx + i);
    ans[i] = createAns(idx + i);
  }
  for (int iter = idx + 1; iter < x; ++iter) {
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < n; ++j) {
        count[2][i][j] = 0;
        for (int k = 0; k < n; ++k) {
          count[2][i][j] =
              (count[2][i][j] + count[1][i][k] * count[0][k][j]) % mod;
        }
      }
    for (int i = 0; i < n; ++i) {
      ans[2][i] = (ans[1][i] * powmod(2, lengths[iter - 1])) % mod;
      for (int j = 0; j < n; ++j)
        ans[2][i] = (ans[2][i] + count[1][i][j] * ans[0][j]) % mod;
    }
    ans[0] = ans[1];
    ans[1] = ans[2];
    count[0] = count[1];
    count[1] = count[2];
  }
  return !printf("%lld\n", ans[1][0]);
}