#include <bits/stdc++.h>
using namespace std;
const int mod = int(1e9) + 7;
int n, k, a[2111111], m;
int PREV[33];
char second[2111111];
void add(int& a, int b) {
  a += b;
  if (a >= mod) {
    a -= mod;
  }
}
int adds(int i, int c) {
  int p = PREV[c];
  int res = a[i - 1];
  if (p > 0) {
    res -= a[p - 1];
    if (res < 0) {
      res += mod;
    }
  }
  return res;
}
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", second);
  m = strlen(second);
  int sum = 1;
  a[0] = 1;
  for (int i = 1; i <= m; i++) {
    int c = second[i - 1] - 'a';
    int x = adds(i, c);
    add(sum, x);
    a[i] = sum;
    PREV[c] = i;
  }
  for (int i = m + 1; i <= m + n; i++) {
    int c = 0;
    for (int j = 1; j < k; j++) {
      if (PREV[j] < PREV[c]) {
        c = j;
      }
    }
    int x = adds(i, c);
    add(sum, x);
    a[i] = sum;
    PREV[c] = i;
  }
  cout << sum << endl;
  return 0;
}
