#include <bits/stdc++.h>
using namespace std;
const int maxn = 300500;
int dp[2000500];
int s[2000500];
int la[27];
char st[2000500];
const int md = (int)1e9 + 7;
inline void add(int &a, int b) {
  a += b;
  if (a >= md) a -= md;
}
inline void sub(int &a, int b) {
  a -= b;
  if (a < 0) a += md;
}
inline int mul(int a, int b) { return (int)((long long)a * b % md); }
int main() {
  ios::sync_with_stdio(0);
  int n, m, k;
  scanf("%d%d%s", &n, &k, st + 1);
  m = strlen(st + 1);
  s[0] = 1;
  for (int i = (1); i < (int)(m + 1); ++i) {
    dp[i] = s[i - 1];
    if (la[(st[i] - 'a')]) sub(dp[i], s[la[(st[i] - 'a')] - 1]);
    add(s[i], s[i - 1] + dp[i]);
    la[(st[i] - 'a')] = i;
  }
  for (int i = m + 1; i <= m + n; i++) {
    int mxj = 0, mx = la[0];
    for (int j = 0; j < (int)(k); ++j) {
      if (la[j] < mx) {
        mxj = j;
        mx = la[j];
      }
    }
    dp[i] = s[i - 1];
    sub(dp[i], s[la[mxj] - 1]);
    add(s[i], s[i - 1] + dp[i]);
    la[mxj] = i;
  }
  cout << s[n + m];
}
