#include <bits/stdc++.h>
using namespace std;
int m, n, k;
char s[1000005];
int dp[1000005 * 2];
int cur[128], last[128];
void s1() {
  for (int i = m - 1; i >= 0; i--) s[i + 1] = s[i];
  s[0] = ' ';
}
void Add(int &x, int y) {
  x += y;
  if (x < 0) x += 1000000007;
  x %= 1000000007;
}
int main() {
  scanf("%d%d", &n, &k);
  cin >> s;
  m = strlen(s);
  s1();
  dp[0] = 1;
  for (int i = 1; i <= m; i++) {
    Add(dp[i], 2 * dp[i - 1]);
    Add(dp[i], -cur[s[i]]);
    cur[s[i]] = dp[i - 1];
    last[s[i]] = i;
  }
  for (int i = m + 1; i <= m + n; i++) {
    Add(dp[i], 2 * dp[i - 1]);
    int mn = 1000000007, id;
    for (char j = 'a'; j < 'a' + k; j++)
      if (last[j] < mn) {
        mn = last[j];
        id = j;
      }
    Add(dp[i], -cur[id]);
    cur[id] = dp[i - 1];
    last[id] = i;
  }
  cout << dp[m + n] << '\n';
  return 0;
}
