Gats and the Startling String
Gats has a string with knots arranged from left to right. Knot has color .
Gats chooses exactly distinct knots. Every subset of knots is chosen with equal probability. Let their positions in increasing order be
For each with , the chosen knot at position is startled if both of the following hold:
- its two neighboring chosen knots have the same color, so ;
The score of a choice is the number of startled knots. Find the expected score over all equally likely choices of knots.
Input
The first line contains two integers and (), the number of knots and the number chosen by Gats.
The second line contains a string of length . Every character of is a lowercase English letter, and is the color of the -th knot.
Output
Let be the number of startled knots after Gats makes his choice. Write the expected value as a reduced fraction .
Print the integer where is the multiplicative inverse of modulo .
Samples
Sample 1
Input
5 3 ababa
Output
500000004
The ten possible choices have a total score of , so the expected score is . Its required residue is .
Sample 2
Input
5 4 ababa
Output
400000004
The five possible choices have a total score of , so the expected score is .