#include <bits/stdc++.h>
using namespace std;
const double pi =
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
char s[1000010];
int dp[2 * 1000010], sum[2 * 1000010], last[30];
int main() {
  int n, k, m;
  scanf("%d%d%s", &n, &k, s);
  m = strlen(s);
  dp[0] = sum[0] = 1;
  for (int i = (1); i <= (m); ++i) {
    dp[i] = (sum[i - 1] -
             (last[s[i - 1] - 'a'] ? sum[last[s[i - 1] - 'a'] - 1] : 0) +
             1000000007) %
            1000000007;
    sum[i] = (sum[i - 1] + dp[i]) % 1000000007;
    last[s[i - 1] - 'a'] = i;
  }
  for (int i = (m + 1); i <= (m + n); ++i) {
    int ind = 0;
    for (int j = (1); j < (k); ++j)
      if (last[j] < last[ind]) ind = j;
    dp[i] = (sum[i - 1] - (last[ind] ? sum[last[ind] - 1] : 0) + 1000000007) %
            1000000007;
    sum[i] = (sum[i - 1] + dp[i]) % 1000000007;
    last[ind] = i;
  }
  printf("%d\n", sum[n + m]);
  return 0;
}
