#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e6 + 10;
const int MOD = 1e9 + 7;
char s[MAXN];
int pre[30], dp[MAXN], cur[30];
int main() {
  int n, k, m;
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  m = strlen(s + 1);
  dp[0] = 1;
  for (int i = 1; i <= m; ++i) {
    if (pre[s[i] - 'a'])
      dp[i] = ((dp[i - 1] * 2ll - cur[s[i] - 'a']) % MOD + MOD) % MOD;
    else
      dp[i] = dp[i - 1] * 2 % MOD;
    (cur[s[i] - 'a'] += (dp[i] - dp[i - 1] + MOD) % MOD) %= MOD;
    pre[s[i] - 'a'] = i;
  }
  for (int i = m + 1; i <= m + n; ++i) {
    int ch = 0, pos = i;
    for (int j = 0; j <= k - 1; ++j) {
      if (pos > pre[j]) {
        pos = pre[j];
        ch = j;
      }
    }
    if (pre[ch])
      dp[i] = ((dp[i - 1] * 2ll - cur[ch]) % MOD + MOD) % MOD;
    else
      dp[i] = dp[i - 1] * 2 % MOD;
    (cur[ch] += (dp[i] - dp[i - 1] + MOD) % MOD) %= MOD;
    pre[ch] = i;
  }
  cout << dp[m + n] << endl;
  return 0;
}
