#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10, A = 46, M = 1e9 + 7;
long long ps[N], lp[A], dp[N], n, k;
int mAx() {
  int res = 0;
  for (int i = 0; i < k; i++)
    if (lp[res] > lp[i]) res = i;
  return res;
}
int main() {
  cin >> n >> k;
  string s;
  cin >> s;
  int m = s.size();
  s = "*" + s;
  dp[0] = 1;
  ps[1] = 1;
  int ans = 1;
  for (int i = 1; i <= m + n; i++) {
    if (i > m) s += ('a' + mAx());
    dp[i] = (ps[i] - ps[lp[s[i] - 'a']] + M) % M;
    ans = (ans + dp[i]) % M;
    ps[i + 1] = (ps[i] + dp[i]) % M;
    lp[s[i] - 'a'] = i;
  }
  cout << ans << endl;
}
