#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1000005;
const long long mod = 1e9 + 7;
long long dp[maxn << 1];
char cc[maxn << 1];
long long lst[27];
struct qq {
  char c;
  long long pos;
  inline bool operator<(const qq& other) const { return this->pos > other.pos; }
};
priority_queue<qq> q;
signed main() {
  long long n, m, k;
  scanf("%lld%lld\n", &n, &k);
  gets(cc + 1);
  m = strlen(cc + 1);
  dp[0] = 1;
  memset(lst, 0xff, sizeof(lst));
  for (long long i = 1; i <= m; ++i) {
    if (~lst[cc[i] - 'a'])
      dp[i] = ((dp[i - 1] << 1) % mod - dp[lst[cc[i] - 'a']]) % mod;
    else
      dp[i] = (dp[i - 1] << 1) % mod;
    lst[cc[i] - 'a'] = i - 1;
  }
  for (long long i = 0; i < k; ++i) {
    q.push((qq){char(i + 'a'), lst[i] + 1});
  }
  for (long long i = m + 1; i <= m + n; ++i) {
    char is = q.top().c;
    q.pop();
    if (~lst[is - 'a'])
      dp[i] = ((dp[i - 1] << 1) % mod - dp[lst[is - 'a']]) % mod;
    else
      dp[i] = (dp[i - 1] << 1) % mod;
    lst[is - 'a'] = i - 1;
    q.push((qq){is, i});
  }
  printf("%lld", (dp[n + m] + mod) % mod);
  return 0;
}
