#include <bits/stdc++.h>
using namespace std;
int dp[2000005];
int last[30];
int main() {
  int i, j, n, k, l, l1, it, mini, index;
  string s, t;
  vector<pair<int, int> > v;
  scanf("%d %d", &n, &k);
  cin >> s;
  l = s.size();
  for (i = 0; i < k; i++) last[i] = -1;
  dp[0] = 1;
  for (i = 1; i <= l; i++) {
    dp[i] = (2 * dp[i - 1]) % 1000000007;
    if (last[s[i - 1] - 'a'] != -1)
      dp[i] = (dp[i] - dp[last[s[i - 1] - 'a'] - 1] + 1000000007) % 1000000007;
    last[s[i - 1] - 'a'] = i;
  }
  for (i = l + 1; i <= l + n; i++) {
    dp[i] = (2 * dp[i - 1]) % 1000000007;
    mini = INT_MAX;
    for (j = 0; j < k; j++)
      if (last[j] < mini) {
        mini = last[j];
        index = j;
      }
    if (!(mini == -1 or mini == INT_MAX))
      dp[i] = (dp[i] - dp[mini - 1] + 1000000007) % 1000000007;
    last[index] = i;
  }
  cout << dp[l + n];
  return 0;
}
