#include <bits/stdc++.h>
using namespace std;
struct __s {
  __s() {
    srand(time(NULL));
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    if (!1)
      fprintf(stderr, "Execution time: %.3lf s.\n",
              (double)clock() / CLOCKS_PER_SEC);
    long long n;
    cin >> n;
  }
} __S;
long long a[26];
long long dp[2][27];
long long mod = 1000000007;
int main(void) {
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  for (long long i = 0; i < (long long)(s.size()); i++) {
    long long j = s[i] - 'a';
    a[j] = i + 1;
  }
  for (long long i = 0; i < (long long)(n); i++) {
    long long idx = 0;
    for (long long j = 0; j < (long long)(k); j++) {
      if (a[idx] > a[j]) idx = j;
    }
    char c = idx + 'a';
    s += c;
    a[idx] = s.size();
  }
  dp[1][0] = 1;
  for (long long i = 0; i < (long long)(s.size()); i++) {
    long long res = 0;
    for (long long j = 0; j < (long long)(27); j++) {
      res += dp[1][j];
    }
    long long j = s[i] - 'a' + 1;
    dp[1][j] = (dp[1][j] + res - dp[0][j] + mod) % mod;
    dp[0][j] = dp[1][j];
  }
  long long ans = 0;
  for (long long i = 0; i < (long long)(27); i++) {
    ans = (ans + dp[1][i]) % mod;
  }
  cout << ans << '\n';
  return 0;
}
