#include <bits/stdc++.h>
using namespace std;
int main() {
  long long mod = 1e9 + 7;
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  long long arr[30] = {0};
  long long last[30];
  memset(last, -1, sizeof last);
  long long bigSum = 1;
  for (int f = 0; f < s.size(); f++) {
    last[s[f] - 'a'] = f;
    long long sum = 1;
    for (int f1 = 0; f1 < k; f1++) {
      if (s[f] != f1 + 'a') sum = (arr[f1] + sum) % mod;
    }
    arr[s[f] - 'a'] += sum;
    arr[s[f] - 'a'] %= mod;
    bigSum += sum;
    bigSum %= mod;
  }
  for (int f = 0; f < n; f++) {
    int i = 0;
    for (int f1 = 0; f1 < k; f1++) {
      if (last[f1] == -1) {
        i = f1;
        break;
      }
      if (last[f1] < last[i]) i = f1;
    }
    long long sum = 1;
    last[i] = s.size() + f;
    for (int f1 = 0; f1 < k; f1++) {
      if (i != f1) sum = (arr[f1] + sum) % mod;
    }
    arr[i] += sum;
    arr[i] %= mod;
    bigSum += sum;
    bigSum %= mod;
  }
  cout << bigSum << endl;
}
