#include <bits/stdc++.h>
#pragma GCC optimize("O3")
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long llinf = (1LL << 61);
const int inf = (1 << 30);
const int nmax = 2e6 + 50;
const int mod = 1e9 + 7;
using namespace std;
int n, m, k, i, j, l[26], t, mn;
long long f[nmax];
char s[nmax];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cerr.tie(0);
  cout.tie(0);
  cin >> n >> k >> (s + 1);
  m = strlen(s + 1), f[0] = 1;
  for (i = 1; i <= m + n; i++) {
    f[i] = (f[i - 1] * 2) % mod;
    if (i <= m)
      t = s[i] - 'a';
    else {
      mn = i;
      for (j = 0; j < k; j++)
        if (l[j] < mn) mn = l[j], t = j;
    }
    if (l[t]) f[i] = (f[i] - f[l[t] - 1] + mod) % mod;
    l[t] = i;
  }
  cout << f[n + m] << endl;
  return 0;
}
