#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long dp[30], lastapp[30];
char s[1000010];
set<pair<int, int> > curr;
int main() {
  scanf(" %lld%lld", &n, &k);
  scanf("%s", s);
  m = strlen(s);
  for (int i = 0; i < k; i++)
    curr.insert(make_pair(-1, i)), dp[i] = 0, lastapp[i] = -1;
  long long tot = 0;
  for (int i = 0; i < m; i++) {
    long long aind = s[i] - 'a';
    pair<int, int> j = make_pair(lastapp[aind], aind);
    long long newv = tot + 1;
    long long tadd = (newv - dp[aind] + 1000000007) % 1000000007;
    tot += tadd;
    tot %= 1000000007;
    dp[aind] += tadd;
    dp[aind] %= 1000000007;
    curr.erase(curr.find(j));
    lastapp[aind] = i;
    curr.insert(make_pair(i, aind));
    tot += 1000000007;
    tot %= 1000000007;
    dp[aind] += 1000000007;
    dp[aind] %= 1000000007;
  }
  for (int i = m; i < n + m; i++) {
    pair<int, int> j = *curr.begin();
    long long aind = j.second;
    long long newv = tot + 1;
    long long tadd = (newv - dp[aind] + 1000000007) % 1000000007;
    tot += tadd;
    tot %= 1000000007;
    dp[aind] += tadd;
    dp[aind] %= 1000000007;
    curr.erase(curr.find(j));
    lastapp[aind] = i;
    curr.insert(make_pair(i, aind));
    tot += 1000000007;
    tot %= 1000000007;
    dp[aind] += 1000000007;
    dp[aind] %= 1000000007;
  }
  tot++;
  tot %= 1000000007;
  printf("%lld\n", tot);
}
