#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:500000000")
using namespace std;
const int mod = (int)1e9 + 7;
char str[2000009];
int sum[26];
int lst[26];
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  scanf("%s", str);
  int m = strlen(str);
  int c = 1;
  memset(lst, -1, sizeof(lst));
  for (int i = 0; i < m + n; i++) {
    int d = i < m ? str[i] - 'a' : min_element(lst, lst + k) - lst;
    int x = (c - sum[d] + mod) % mod;
    sum[d] = c;
    c = (c + x) % mod;
    lst[d] = i;
  }
  cout << c << endl;
}
