#include <bits/stdc++.h>
using namespace std;
const int inf = 2e9;
const long long Inf = 1e10;
const int P = 1e9 + 7;
const int N = 2000005;
inline int IN() {
  int x = 0;
  int ch = 0, f = 0;
  for (ch = getchar(); ch != -1 && (ch < 48 || ch > 57); ch = getchar())
    f = (ch == '-');
  for (; ch >= 48 && ch <= 57; ch = getchar())
    x = (x << 1) + (x << 3) + ch - '0';
  return f ? (-x) : x;
}
int Pow(int x, int y, int p) {
  int a = 1;
  for (; y; y >>= 1, x = (long long)x * x % p)
    if (y & 1) a = (long long)a * x % p;
  return a;
}
int V[15], f[N], n, k, m, last[30];
char str[N];
void append(int pos, int val) {
  f[pos] = f[pos - 1];
  f[pos] = (0ll + f[pos] + f[pos - 1] + P - f[last[val] - 1]) % P;
  last[val] = pos;
}
int main() {
  scanf("%d%d", &n, &k);
  f[0] = 1;
  scanf("%s", str + 1);
  m = strlen(str + 1);
  for (int i = (int)(1); i <= (int)(m); i++) {
    int id = str[i] - 'a' + 1;
    append(i, id);
  }
  for (int i = (int)(m + 1); i <= (int)(m + n); i++) {
    int A = 1;
    for (int V = (int)(1); V <= (int)(k); V++)
      if (last[V] < last[A]) A = V;
    append(i, A);
  }
  printf("%d\n", f[n + m]);
  return 0;
}
