#include <bits/stdc++.h>
const int MaxN = 2111111, Mod = 1e9 + 7;
int n, m, k;
char s[MaxN];
int f[MaxN], last[26];
int main() {
  scanf("%d %d", &n, &k);
  scanf("%s", s + 1);
  m = strlen(s + 1);
  f[0] = 1;
  for (register int i = 1; i <= m; ++i) {
    f[i] = (2 * f[i - 1] % Mod - f[last[s[i] - 'a'] - 1] + Mod) % Mod;
    last[s[i] - 'a'] = i;
  }
  for (register int i = m + 1; i <= m + n; ++i) {
    int mn = 0;
    for (register int j = 0; j <= k - 1; ++j)
      if (last[j] < last[mn]) mn = j;
    f[i] = (2 * f[i - 1] % Mod - f[last[mn] - 1] + Mod) % Mod;
    last[mn] = i;
  }
  printf("%d\n", f[m + n]);
  return 0;
}
