#include <bits/stdc++.h>
using namespace std;
inline int nxt() {
  int first;
  cin >> first;
  return first;
}
const int mod = 1000000007;
int main() {
  cin.sync_with_stdio(0);
  int n = nxt(), k = nxt();
  string s;
  cin >> s;
  int m = s.length();
  vector<int> pr(k, -1);
  vector<long long> cnt(m + n);
  vector<long long> S(m + n);
  long long qw = 0;
  for (int i = 0; i < m; i++) {
    int c = s[i] - 'a';
    if (pr[c] == -1) {
      cnt[i] += qw;
    } else {
      cnt[i] += qw - S[pr[c]] + mod;
    }
    if (pr[c] > -1)
      cnt[i] += cnt[pr[c]];
    else
      cnt[i] += 1;
    cnt[i] %= mod;
    S[i] = (qw + cnt[i]) % mod;
    pr[c] = i;
    qw = S[i];
  }
  vector<int> qq;
  int of;
  for (int i = m; i < m + n; i++) {
    int c;
    if (qq.size() < k)
      c = min_element((pr).begin(), (pr).end()) - pr.begin();
    else
      c = qq[(i - of) % k];
    if (pr[c] == -1) {
      cnt[i] += qw;
    } else {
      cnt[i] += qw - S[pr[c]] + mod;
    }
    if (pr[c] > -1)
      cnt[i] += cnt[pr[c]];
    else
      cnt[i] += 1;
    cnt[i] %= mod;
    S[i] = (qw + cnt[i]) % mod;
    pr[c] = i;
    qw = S[i];
    if (qq.size() < k) {
      qq.push_back(c);
      if (qq.size() == k) of = i + 1;
    }
  }
  cout << (S[n + m - 1] + 1) % mod << "\n";
  return 0;
}
