#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
long long f[3400000], g[4300000];
char s[1200000];
int n, k, last[30];
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  int len = strlen(s + 1);
  for (int i = 1; i <= len; i++) {
    int num = s[i] - 'a';
    if (last[num])
      f[i] = (g[i - 1] - g[last[num] - 1] + mod) % mod;
    else
      f[i] = (g[i - 1] + 1) % mod;
    last[num] = i;
    g[i] = (g[i - 1] + f[i]) % mod;
  }
  int ll = len + n;
  for (int i = len + 1; i <= ll; i++) {
    int min_lst = -1;
    for (int j = 0; j < k; j++)
      if (min_lst == -1 || last[j] < last[min_lst]) min_lst = j;
    if (last[min_lst])
      f[i] = (g[i - 1] - g[last[min_lst] - 1] + mod) % mod;
    else
      f[i] = (g[i - 1] + 1) % mod;
    last[min_lst] = i;
    g[i] = (g[i - 1] + f[i]) % mod;
  }
  printf("%lld", (g[n + len] + 1) % mod);
  return 0;
}
