#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int m;
int n;
int k;
int mod = 1000000000 + 7;
char s[2500000];
int last[30];
int sum[2000500];
int c[2000500];
int main() {
  cin >> n >> k;
  gets(s);
  gets(s);
  memset(last, -1, sizeof(last));
  m = strlen(s);
  for (int i = 0; i < (m); i++) last[s[i] - 'a'] = i;
  for (int i = 0; i < (n); i++) {
    int p = min_element(last, last + k) - last;
    s[i + m] = (char)(p + 'a');
    last[p] = i + m;
  }
  memset(last, -1, sizeof(last));
  for (int i = 0; i < (n + m); i++) {
    int x = s[i] - 'a';
    int a = 1;
    if (i) a = sum[i - 1];
    c[i] = a;
    int b = a;
    if (last[x] != -1) {
      b += (mod - c[last[x]]);
      b %= mod;
    }
    sum[i] = (a + b) % mod;
    last[x] = i;
  }
  cout << sum[n + m - 1] << endl;
  return 0;
}
