#include <bits/stdc++.h>
using namespace std;
char s[2000000 + 5];
vector<int> t;
bool ck[30 + 5];
int f[30 + 3], tot, mod = 1e9 + 7, n, k, m, ptr;
int main() {
  scanf("%d %d", &n, &k);
  scanf("%s", s);
  m = strlen(s);
  for (int i = m - 1; i >= 0; i--)
    if (!ck[s[i] - 'a']) {
      ck[s[i] - 'a'] = true;
      t.push_back((int)s[i] - 'a');
    }
  for (int i = 0; i < k; i++)
    if (!ck[i]) t.push_back(i);
  reverse(t.begin(), t.end());
  for (int i = 0; i < m; i++) {
    int x = s[i] - 'a';
    int ret = f[x];
    f[x] = (tot + 1) % mod;
    tot = (tot - ret + mod) % mod;
    tot = (tot + f[x]) % mod;
  }
  for (int i = 1; i <= n; i++) {
    int x = t[ptr];
    int ret = f[x];
    f[x] = (tot + 1) % mod;
    tot = (tot - ret + mod) % mod;
    tot = (tot + f[x]) % mod;
    ptr = (ptr + 1) % k;
  }
  printf("%d", (tot + 1) % mod);
}
