#include <bits/stdc++.h>
inline long long read() {
  long long x = 0;
  char c = getchar(), f = 1;
  for (; c < '0' || '9' < c; c = getchar())
    if (c == '-') f = -1;
  for (; '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  return x * f;
}
inline void write(long long x) {
  static char buf[20];
  int len = 0;
  if (x < 0) putchar('-'), x = -x;
  for (; x; x /= 10) buf[len++] = x % 10 + '0';
  if (!len)
    putchar('0');
  else
    while (len) putchar(buf[--len]);
}
inline void writesp(long long x) {
  write(x);
  putchar(' ');
}
inline void writeln(long long x) {
  write(x);
  putchar('\n');
}
int f[2 * 1000010];
int last[26];
char s[1000010];
int n, m, k;
int main() {
  n = read();
  k = read();
  scanf("%s", s + 1);
  m = strlen(s + 1);
  for (int i = 0; i < k; i++) last[i] = 0;
  f[0] = 0;
  for (int i = 1; i <= m; i++) {
    int sum = 1;
    for (int j = 0; j < k; j++) sum = (sum + f[last[j]]) % 1000000007;
    f[i] = sum;
    last[s[i] - 'a'] = i;
  }
  for (int i = m + 1; i <= m + n; i++) {
    int id = 0, sum = 1;
    for (int j = 0; j < k; j++) {
      if (last[j] < last[id]) id = j;
      sum = (sum + f[last[j]]) % 1000000007;
    }
    f[i] = sum;
    last[id] = i;
  }
  int ans = 1;
  for (int i = 0; i < k; i++) ans = (ans + f[last[i]]) % 1000000007;
  writeln(ans);
  return 0;
}
