#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 7;
const int M = 1e9 + 7;
int n, m, k, dp[N], nxt[N][30];
int pos[30], v[30];
char s[N];
void Update(int &a, int v) {
  a += v;
  if (a >= M) a -= M;
}
bool comp(int x, int y) { return pos[x] < pos[y]; }
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  m = strlen(s + 1);
  for (int i = 1; i <= m; ++i) pos[s[i] - 'a' + 1] = i;
  for (int i = 0; i < k; ++i) v[i] = i + 1;
  sort(v, v + k, comp);
  for (int i = 1, d = 0; i <= n; ++i, d = (d + 1) % k) {
    int t = v[d];
    s[i + m] = t - 1 + 'a';
  }
  n += m;
  for (int i = 1; i <= k; ++i) nxt[n + 1][i] = n + 1;
  for (int i = n; i >= 1; --i) {
    for (int j = 1; j <= k; ++j) nxt[i][j] = nxt[i + 1][j];
    nxt[i][s[i] - 'a' + 1] = i;
  }
  dp[0] = 1;
  for (int i = 0; i < n; ++i) {
    for (int j = 1; j <= k; ++j) {
      int p = nxt[i + 1][j];
      Update(dp[p], dp[i]);
    }
  }
  int res = 1;
  for (int i = 1; i <= n; ++i) Update(res, dp[i]);
  printf("%d", res);
  return 0;
}
