#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
const int mod = 1000000007;
string s;
int _prev[26];
long long int X[2 * N], S[2 * N];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  cin >> s;
  int m = s.size();
  for (int i = 0; i < s.size(); i++) {
    int c = s[i] - 'a';
    if (!_prev[c]) {
      X[i + 1] = S[i] + 1;
      if (X[i + 1] >= mod) X[i + 1] -= mod;
    } else {
      X[i + 1] = (S[i] - S[_prev[c] - 1] + mod) % mod;
    }
    _prev[c] = i + 1;
    S[i + 1] = (S[i] + X[i + 1]) % mod;
  }
  for (int i = 1; i < n + 1; i++) {
    int c = 0;
    for (int j = 0; j < k; j++)
      if (_prev[j] < _prev[c]) {
        c = j;
      }
    if (!_prev[c]) {
      X[i + m] = (S[i + m - 1] - S[_prev[c]] + mod) % mod;
      X[i + m]++;
    } else {
      X[i + m] = (S[i + m - 1] - S[_prev[c] - 1] + mod) % mod;
    }
    _prev[c] = i + m;
    S[i + m] = (S[i + m - 1] + X[i + m]) % mod;
  }
  printf("%d\n", (S[n + m] + 1) % mod);
  return 0;
}
