#include <bits/stdc++.h>
using namespace std;
long long int MOD = 1e9 + 7;
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  multiset<long long int> counts;
  vector<long long int> Count(k + 1, 0);
  Count[s[0] - 'a' + 1] = 1;
  vector<long long int> last(k + 1, -1);
  last[s[0] - 'a' + 1] = 0;
  for (int i = 1; i < s.length(); i++) {
    long long int temp = Count[s[i] - 'a' + 1];
    Count[s[i] - 'a' + 1] = 0;
    for (int j = 1; j <= k; j++) {
      if (j != s[i] - 'a' + 1)
        Count[s[i] - 'a' + 1] = (Count[j] + Count[s[i] - 'a' + 1]) % MOD;
    }
    last[s[i] - 'a' + 1] = i;
    Count[s[i] - 'a' + 1] = (Count[s[i] - 'a' + 1] + temp + 1) % MOD;
  }
  long long int sum = 0;
  vector<long long int> arr(k + 1, 0);
  for (int i = 1; i <= k; i++) {
    sum = (sum + Count[i]) % MOD;
    arr[i] = Count[i];
    counts.insert(Count[i]);
  }
  for (int i = 1; i <= n; i++) {
    long long int mini = 1e17, Index = -1;
    for (int j = 1; j <= k; j++) {
      if (last[j] < mini) {
        mini = last[j];
        Index = j;
      }
    }
    long long int temp = sum;
    sum = (2 * sum - arr[Index] + 1 + MOD) % MOD;
    arr[Index] = (temp + 1) % MOD;
    last[Index] = s.length() + i - 1;
  }
  cout << (sum + 1) % MOD << endl;
  return 0;
}
