#include <bits/stdc++.h>
using namespace std;
const int maxN = 2e6 + 1000;
const int mod = 1e9 + 7;
int n, k;
string s;
int id[40];
long long a[maxN];
long long pref[maxN];
int main(void) {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  cin >> s;
  for (int i = 0; i < (int)s.size(); i++) {
    a[i + 1] = s[i] - 'a' + 1;
  }
  int m = ((int)s.size());
  long long ans = 1;
  for (int i = 1; i <= m; i++) {
    long long tmp = 0;
    if (id[a[i]] == 0) {
      tmp++;
      tmp += pref[i - 1];
      tmp %= mod;
      id[a[i]] = i;
    } else {
      tmp += pref[i - 1] - pref[id[a[i]] - 1] + mod;
      tmp %= mod;
      id[a[i]] = i;
    }
    pref[i] = (tmp + pref[i - 1]) % mod;
    ans += tmp;
    ans %= mod;
  }
  for (int i = m + 1; i <= m + n; i++) {
    int p = min_element(id + 1, id + k + 1) - id;
    long long tmp = (id[p] == 0);
    tmp += pref[i - 1] - pref[max(0, id[p] - 1)] + mod;
    tmp %= mod;
    id[p] = i;
    pref[i] = (tmp + pref[i - 1]) % mod;
    ans += tmp;
    ans %= mod;
  }
  cout << (ans) % mod << endl;
  return 0;
}
