#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
T gcd(T a, T b) {
  return a ? gcd(b % a, a) : b;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T sgn(T a) {
  return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
const int mod = 1000 * 1000 * 1000 + 7;
int n;
int m;
int last[26];
int res[2000100];
int sum[2000100];
int k;
string s;
int main() {
  cin >> n >> k;
  cin >> s;
  n += ((int)(s).size());
  res[0] = 1;
  sum[1] = 1;
  for (int i = 1; i <= n; i++)
    if (i <= ((int)(s).size())) {
      res[i] = (sum[i] - sum[last[s[i - 1] - 'a']] + mod) % mod;
      sum[i + 1] = (sum[i] + res[i]) % mod;
      last[s[i - 1] - 'a'] = i;
    } else {
      int best = 0;
      for (int j = 0; j < k; j++)
        if (last[best] > last[j]) best = j;
      res[i] = (sum[i] - sum[last[best]] + mod) % mod;
      sum[i + 1] = (sum[i] + res[i]) % mod;
      last[best] = i;
    }
  printf("%d\n", sum[n + 1]);
  return 0;
}
