#include <bits/stdc++.h>
using namespace std;
const int SIZE = 1000;
const int MAXM = 1e7 + 10;
const long long MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
int n, k;
char s[MAXM + 10];
long long sum[50];
long long pos[50];
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s);
  int len = strlen(s);
  long long ans = 1;
  memset(sum, 0, sizeof(sum));
  memset(pos, 0, sizeof(pos));
  for (int i = 0; i < len; i++) {
    int x = s[i] - 'a';
    long long pre = ans;
    ans = (ans * 2 - sum[x] + MOD) % MOD;
    sum[x] = pre;
    pos[x] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    int index = INF;
    int tp = 0;
    for (int j = 0; j < k; j++) {
      if (pos[j] < index) {
        index = pos[j];
        tp = j;
      }
    }
    long long pre = ans;
    ans = (ans * 2 - sum[tp] + MOD) % MOD;
    sum[tp] = pre;
    pos[tp] = i + 1 + len;
  }
  printf("%lld\n", ans);
  return 0;
}
