#include <bits/stdc++.h>
using namespace std;
long long int a[30], b[30];
char s[1000005];
struct st {
  long long int x, y;
} ara[30];
bool comp(struct st x1, struct st x2) { return x1.y < x2.y; };
int main() {
  long long int i, j, k, l, m, n, ans = 1LL, t;
  scanf("%lld %lld", &n, &k);
  scanf("%s", s);
  m = strlen(s);
  for (i = 1; i <= m; i++) {
    j = s[i - 1] - 'a';
    l = (((ans - a[j]) % 1000000007) + 1000000007) % 1000000007;
    ans = (ans + l) % 1000000007;
    a[j] = (a[j] + l) % 1000000007;
    b[j] = i;
  }
  for (i = 0; i < k; i++) ara[i] = {a[i], b[i]};
  sort(ara, ara + k, comp);
  for (i = 0; i < k; i++) a[i] = ara[i].x;
  for (i = 1; i <= n; i++) {
    l = (((ans - a[0]) % 1000000007) + 1000000007) % 1000000007;
    ans = (ans + l) % 1000000007;
    a[0] = (a[0] + l) % 1000000007;
    t = a[0];
    for (j = 0; j <= k - 2; j++) a[j] = a[j + 1];
    a[j] = t;
  }
  printf("%lld\n", ((ans % 1000000007) + 1000000007) % 1000000007);
  return 0;
}
