#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
const int K = 26;
const int mod = 1e9 + 7;
int n, k, cnt[K], last[K];
char s[N];
int main() {
  scanf("%d %d %s", &n, &k, s);
  int m = strlen(s);
  long long sum = 1;
  for (int i = 0; s[i]; ++i) {
    s[i] -= 'a';
    int prv = cnt[s[i]];
    cnt[s[i]] = sum;
    last[s[i]] = i + 1;
    sum += mod - prv;
    sum += cnt[s[i]];
    sum %= mod;
  }
  for (int i = 0; i < n; ++i) {
    int mn = 0;
    for (int j = 1; j < k; ++j) {
      if (last[mn] > last[j]) mn = j;
    }
    int prv = cnt[mn];
    cnt[mn] = sum;
    last[mn] = i + m + 1;
    sum += mod - prv;
    sum += cnt[mn];
    sum %= mod;
  }
  cout << sum << endl;
  return 0;
}
