Extensive Or

No attempts yetTime limit3sMemory limit256 MB

Problem

A very large number RR is given in compressed form. The compression is a binary string ss and an integer kk. Start from the empty string and append ss to it kk times to get the binary representation of RR. The first character of ss is always 1.

For that RR, answer the following. How many sets of nn distinct integers are there such that every element is between 0 and R1R - 1 inclusive and the XOR of all elements is 0? The count can get very large, so report it modulo 109+710^9 + 7.

XOR is exclusive or, and the XOR of two numbers is taken bit by bit. Writing \oplus for XOR:

  • 00=00 \oplus 0 = 0
  • 01=10 \oplus 1 = 1
  • 10=11 \oplus 0 = 1
  • 11=01 \oplus 1 = 0

XOR is associative, so a(bc)=(ab)ca \oplus (b \oplus c) = (a \oplus b) \oplus c.

Input

The input is a single test case and has exactly two lines. The first line has two space separated integers nn and kk (3n73 \le n \le 7, 1k1000001 \le k \le 100000), where nn is the number of distinct integers in a set and kk is how many times ss is repeated to build RR. The second line has the string ss. Its length is between 1 and 50, every character is 0 or 1, and the first character is 1.

Output

Print on one line the number of sets of nn distinct integers, each between 0 and R1R - 1 inclusive, whose elements XOR to 0, modulo 109+710^9 + 7.