#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
int main() {
  int N, K, i, j, save;
  string S;
  cin >> N >> K >> S;
  S = "#" + S;
  vector<int> Pos(26, -1);
  vector<int> DP(N + S.length(), 0);
  DP[0] = 1LL;
  for (i = 1; i < S.length(); ++i) {
    DP[i] =
        (DP[i - 1] * 2LL - (Pos[S[i] - 'a'] != -1 ? DP[Pos[S[i] - 'a']] : 0)) %
        MOD;
    Pos[S[i] - 'a'] = i - 1;
  }
  for (; i <= S.length() + N - 1; ++i) {
    save = i - 1;
    int idx = -1;
    for (int k = 0; k < K; ++k) {
      if (save >= Pos[k]) {
        save = Pos[k];
        idx = k;
      }
    }
    Pos[idx] = i - 1;
    DP[i] = (DP[i - 1] + DP[i - 1] * 1LL - (save != -1 ? DP[save] : 0)) % MOD;
  }
  if (DP[S.length() + N - 1] < 0) DP[S.length() + N - 1] += MOD;
  cout << DP[S.length() + N - 1] << endl;
  return 0;
}
