#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
long long findAns(const string &s) {
  vector<int> ans(s.length() + 1, 0);
  vector<int> pr(26, -1);
  ans[0] = 1;
  for (int i = 1; i <= (int)s.length(); ++i) {
    ans[i] = 2 * ans[i - 1];
    int l = s[i - 1] - 'a';
    if (pr[l] >= 0) ans[i] -= ans[pr[l] - 1];
    pr[l] = i;
    if (ans[i] < 0) ans[i] += MOD;
    while (ans[i] >= MOD) ans[i] -= MOD;
  }
  return ans.back();
}
long long findAnsGreedy(int n, int k, string s) {
  vector<int> pr(k, -1);
  int m = s.length();
  for (int i = 0; i < m; ++i) pr[s[i] - 'a'] = i;
  for (int i = m; i < m + n; ++i) {
    int num = min_element(pr.begin(), pr.end()) - pr.begin();
    s.push_back('a' + num);
    pr[num] = i;
  }
  return findAns(s);
}
vector<string> allS(int n, int k) {
  int step = 1;
  for (int i = 1; i <= n; ++i) step *= k;
  vector<string> ans;
  for (int mi = 0; mi < step; ++mi) {
    int mask = mi;
    string t = "";
    for (int i = 0; i < n; ++i) {
      t.push_back('a' + (mask % k));
      mask /= k;
    }
    ans.push_back(t);
  }
  return ans;
}
long long findAnsStupid(int n, int k, string s) {
  long long ans = 0;
  vector<string> ss = allS(n, k);
  for (const string &t : ss) ans = max(ans, findAns(s + t));
  return ans;
}
int main() {
  int n, m, k;
  string s;
  cin >> n >> k >> s;
  cout << findAnsGreedy(n, k, s) << "\n";
  return 0;
}
