#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10, INF = 0x3f3f3f3f, mod = 1e9 + 7;
int dp[30], last[30];
char s[maxn << 1];
inline int add(int a, int b) {
  a += b;
  if (a >= mod) a -= mod;
  return a;
}
int sum(int k) {
  int res = 0;
  for (int i = 0; i < k; ++i) res = add(res, dp[i]);
  return res;
}
int main() {
  int n, k;
  scanf("%d%d%s", &n, &k, s + 1);
  int m = strlen(s + 1);
  for (int i = 1; i <= m; ++i) {
    int c = s[i] - 'a';
    dp[c] = sum(k) + 1;
    last[c] = i;
  }
  for (int i = m + 1; i <= m + n; ++i) {
    int c = min_element(last, last + k) - last;
    dp[c] = sum(k) + 1;
    last[c] = i;
  }
  printf("%d", add(sum(k), 1));
  return 0;
}
