#include <bits/stdc++.h>
using namespace std;
const int MAX_M = 1000010;
const int MOD = 1000000007;
char s[MAX_M];
long long dp[26];
pair<int, int> last[26];
int Mod(long long x, int p) { return (x % p + p) % p; }
int main() {
  for (int i = 0; i < 26; ++i) {
    last[i].second = i;
  }
  int n, k;
  scanf("%d %d", &n, &k);
  scanf("%s", s);
  int m = strlen(s);
  long long sum = 0;
  for (int i = 0; i < m; ++i) {
    int c = s[i] - 'a';
    long long old_value = dp[c];
    dp[c] = (sum + 1) % MOD;
    sum = (sum - old_value + dp[c]) % MOD;
    last[c].first = i + 1;
  }
  sort(last, last + 26);
  deque<int> q;
  for (int i = 0; i < 26; ++i) {
    if (last[i].second < k) {
      q.push_back(last[i].second);
    }
  }
  for (int i = 0; i < n; ++i) {
    int c = q.front();
    q.pop_front();
    q.push_back(c);
    long long old_value = dp[c];
    dp[c] = (sum + 1) % MOD;
    sum = (sum - old_value + dp[c]) % MOD;
  }
  printf("%d", Mod(1 + sum, MOD));
  return 0;
}
