#include <bits/stdc++.h>
using namespace std;
const long long N = 2e6 + 10000;
const long long mod = 1e9 + 7;
long long n, m, k;
char s[N];
long long las[N];
long long f[N];
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
priority_queue<pair<long long, long long>> q;
signed main() {
  n = read(), k = read();
  cin >> (s + 1);
  long long len = strlen(s + 1);
  f[0] = 1;
  for (long long i = 1; i <= len; ++i) {
    long long c = s[i];
    if (las[c] == 0) {
      f[i] = (f[i - 1] * 2) % mod;
      las[c] = i;
    } else
      f[i] = (f[i - 1] * 2 - f[las[c] - 1]) % mod, las[c] = i;
  }
  for (char i = 'a'; i < 'a' + k; ++i) q.push(make_pair(-las[i], i));
  for (long long i = 1; i <= n; ++i) {
    long long c = q.top().first, d = q.top().second;
    q.pop();
    c = -c;
    if (las[d] == 0)
      f[i + len] = f[i + len - 1] * 2 % mod;
    else {
      f[i + len] = (f[i + len - 1] * 2 - f[c - 1]) % mod;
    }
    las[d] = i + len;
    q.push(make_pair(-las[d], d));
  }
  printf("%lld\n", (f[len + n] + mod) % mod);
  return 0;
}
