#include <bits/stdc++.h>
using namespace std;
int solve(char *p, int n, int k) {
  static int d[2000111];
  int lastpos[26];
  for (int i = 0; i < k; ++i) lastpos[i] = -1;
  int z = 0;
  for (int i = 0; i < n; ++i) {
    if (p[i] == 0) z = 1;
    if (z) {
      int bestp, bestj = -1;
      for (int j = 0; j < k; ++j)
        if (bestj < 0 || lastpos[j] < bestp) {
          bestp = lastpos[j];
          bestj = j;
        }
      p[i] = bestj + 'a';
    }
    int c = p[i] - 'a';
    lastpos[c] = i;
  }
  p[n] = 0;
  for (int i = 0; i < k; ++i) lastpos[i] = -1;
  d[0] = 1;
  for (int i = 0; p[i]; ++i) {
    int c = p[i] - 'a';
    d[i + 1] = (2 * d[i]) % 1000000007;
    if (lastpos[c] != -1)
      d[i + 1] = (d[i + 1] + 1000000007 - d[lastpos[c]]) % 1000000007;
    lastpos[c] = i;
  }
  return d[n];
}
int main() {
  ios::sync_with_stdio(false);
  static char str[2000111];
  int n, k;
  gets(str);
  sscanf(str, "%d %d", &n, &k);
  gets(str);
  int ans = solve(str, strlen(str) + n, k);
  cout << ans << "\n";
  return 0;
}
