#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int inf = 1e9;
long long powm(long long a, long long p, long long m) {
  long long r = 1 % m;
  while (p) {
    if (p & 1) r = r * a % m;
    p >>= 1;
    a = a * a % m;
  }
  return r;
}
char s[1000010];
int main() {
  int n, k, ord[26];
  scanf("%d%d%s", &n, &k, s);
  for (int i = 0; i < k; ++i) ord[i] = i;
  long long dp[26] = {}, ans = 1;
  int m = strlen(s);
  for (int i = 0; i < m + n; ++i) {
    int j;
    if (i < m)
      j = s[i] - 'a';
    else
      j = ord[0];
    for (int x = 0; x < k; ++x)
      if (x != j) dp[j] = (dp[j] + dp[x]) % mod;
    dp[j] = (dp[j] + 1) % mod;
    for (int x = 0; x < k - 1; ++x)
      if (ord[x] == j) swap(ord[x], ord[x + 1]);
  }
  for (int i = 0; i < k; ++i) ans = (ans + dp[i]) % mod;
  cout << ans << endl;
  return 0;
}
