#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int mod = 1000000007;
const int SIGMA_SIZE = 30;
const int maxn = 2000005;
char s[maxn];
int dp[maxn];
int last[SIGMA_SIZE];
int n, k;
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  int lens = strlen(s + 1);
  dp[0] = 1;
  for (int i = 1; i <= lens; i++) {
    dp[i] = dp[i - 1] << 1;
    dp[i] %= mod;
    if (last[s[i] - 'a' + 1]) dp[i] -= dp[last[s[i] - 'a' + 1] - 1];
    dp[i] %= mod;
    last[s[i] - 'a' + 1] = i;
  }
  n += lens;
  for (int i = lens + 1; i <= n; i++) {
    dp[i] = dp[i - 1] << 1;
    dp[i] %= mod;
    int pos = INF, id;
    for (int p = 1; p <= k; p++)
      if (pos > last[p]) pos = last[p], id = p;
    if (pos) dp[i] -= dp[pos - 1];
    dp[i] %= mod;
    last[id] = i;
  }
  printf("%d", (dp[n] % mod + mod) % mod);
  return 0;
}
