#include <bits/stdc++.h>
using namespace std;
const int M = 2e6 + 5;
const int P = 1e9 + 7;
char str[M];
int m, ans, dp[M], sum[M];
int last[30];
bool mark[30][30], flag[30], f[30];
inline void Mod_add(int &x, int y) {
  if ((x += y) >= P) x -= P;
}
inline void Mod_sub(int &x, int y) {
  if ((x -= y) < 0) x += P;
}
int main() {
  int n, k;
  cin >> n >> k;
  scanf("%s", str + 1);
  m = strlen(str + 1);
  for (int i = 1; i <= m; ++i) str[i] -= 'a';
  for (int i = 0; i < 26; ++i) last[i] = 1;
  int cnt = 0;
  for (int i = 1; i <= m; ++i) {
    int x = str[i];
    if (!flag[x]) flag[x] = 1, dp[i] = 1, ++cnt;
    Mod_add(dp[i], sum[i - 1]);
    Mod_sub(dp[i], sum[last[x] - 1]);
    Mod_add(sum[i], sum[i - 1]);
    Mod_add(sum[i], dp[i]);
    last[x] = i;
  }
  for (int i = 0; i < 26; ++i) f[i] = flag[i];
  for (int i = 0; i < 26; ++i) {
    if (cnt == k) break;
    if (f[i]) continue;
    f[i] = 1;
    ++cnt;
  }
  for (int i = m + 1; i <= m + n; ++i) {
    int p = 0, Mn = 1 << 30;
    for (int j = 0; j < 26; ++j)
      if (f[j] && last[j] < Mn) Mn = last[j], p = j;
    for (int j = 0; j < 26; ++j)
      if (!flag[j] && f[j]) Mn = last[j], p = j;
    if (!flag[p]) flag[p] = 1, dp[i] = 1;
    Mod_add(dp[i], sum[i - 1]);
    Mod_sub(dp[i], sum[Mn - 1]);
    Mod_add(sum[i], sum[i - 1]);
    Mod_add(sum[i], dp[i]);
    last[p] = i;
  }
  for (int i = 1; i <= n + m; ++i) Mod_add(ans, dp[i]);
  Mod_add(ans, 1);
  cout << ans << endl;
  return 0;
}
