#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
char str[1000009];
long long dp[30], sum = 0;
long long h[30];
long long findb() {
  long long mm = h[0], last = 0, i;
  for (i = 1; i < k; i++) {
    if (h[i] < mm) {
      mm = h[i];
      last = i;
    }
  }
  return last;
}
int main() {
  scanf("%lld%lld", &n, &k);
  long long i, j;
  scanf("%s", str);
  m = strlen(str);
  for (i = 0; i < k; i++) h[i] = -1;
  for (i = 0; i < m; i++) {
    sum = (sum - dp[str[i] - 'a'] + 1000000007) % 1000000007;
    dp[str[i] - 'a'] = (1 + sum + dp[str[i] - 'a']) % 1000000007;
    sum = (sum + dp[str[i] - 'a']) % 1000000007;
    h[str[i] - 'a'] = i;
  }
  for (i = m; i < m + n; i++) {
    long long c = findb();
    sum = (sum - dp[c] + 1000000007) % 1000000007;
    dp[c] = (1 + sum + dp[c]) % 1000000007;
    sum = (sum + dp[c]) % 1000000007;
    h[c] = i;
  }
  sum = sum + 1;
  printf("%lld\n", sum);
  return 0;
}
