#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000100;
const int MOD = 1e9 + 7;
int n, k;
long long dp[MAXN];
int pos[30];
char t[MAXN];
int main() {
  scanf("%d%d%s", &n, &k, t + 1);
  int len = strlen(t + 1);
  dp[0] = 1;
  for (int i = 1; i <= len; i++) {
    dp[i] = (dp[i - 1] << 1);
    if (pos[t[i] - 'a'] > 0) dp[i] -= dp[pos[t[i] - 'a'] - 1];
    dp[i] %= MOD;
    pos[t[i] - 'a'] = i;
  }
  for (int i = len + 1; i <= len + n; i++) {
    dp[i] = (dp[i - 1] << 1);
    int id, p = i;
    for (int j = 0; j < k; j++) {
      if (pos[j] < p) {
        p = pos[j];
        id = j;
      }
    }
    if (p > 0) dp[i] -= dp[p - 1];
    dp[i] %= MOD;
    pos[id] = i;
  }
  printf("%d", (dp[len + n] + MOD) % MOD);
  return 0;
}
