#include <bits/stdc++.h>
using namespace std;
char s[1000003];
long long a[27];
bool check[27] = {false};
int main() {
  long long m, n, k, i, j;
  scanf("%lld %lld", &n, &k);
  scanf("%s", s);
  m = strlen(s);
  for (i = 0; i < 27; i++) check[i] = a[i] = 0;
  long long t = 1;
  for (i = 0; i < m; i++) {
    long long p = t;
    t = (2 * t + 1000000007 - a[s[i] - 'a']) % 1000000007;
    a[s[i] - 'a'] = p;
    check[s[i] - 'a'] = true;
  }
  queue<int> q;
  for (i = 0; i < k; i++) {
    if (!check[i]) {
      q.push(i);
      check[i] = true;
    } else
      check[i] = false;
  }
  vector<int> v;
  for (i = m - 1; i >= 0; i--) {
    if (!check[s[i] - 'a']) {
      v.push_back(s[i] - 'a');
      check[s[i] - 'a'] = true;
    }
  }
  while (!v.empty()) {
    q.push(v.back());
    v.pop_back();
  }
  for (i = 0; i < n; i++) {
    int x = q.front();
    q.pop();
    q.push(x);
    long long p = t;
    t = (2 * t + 1000000007 - a[x]) % 1000000007;
    a[x] = p;
  }
  printf("%lld\n", t);
  return 0;
}
