#include <bits/stdc++.h>
using namespace std;
int n, k;
string s;
long long dp[27];
long long last[27];
int mod = 1000000007;
int when[27];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k;
  cin >> s;
  long long sum = 1;
  for (int i = 0; i < 27; ++i) when[i] = -1;
  for (int i = 0; i < s.size(); ++i) {
    when[s[i] - 'a'] = i;
    long long cur = (sum + dp[s[i] - 'a'] - last[s[i] - 'a'] + mod) % mod;
    last[s[i] - 'a'] = sum;
    dp[s[i] - 'a'] = cur;
    sum = 1;
    for (int j = 0; j < k; ++j) sum = (sum + dp[j]) % mod;
  }
  for (int i = 0; i < n; ++i) {
    int mx = 0;
    for (int j = 0; j < k; ++j)
      if (when[j] < when[mx]) mx = j;
    when[mx] = s.size() + i;
    long long cur = (sum + dp[mx] - last[mx] + mod) % mod;
    last[mx] = sum;
    dp[mx] = cur;
    sum = 1;
    for (int j = 0; j < k; ++j) sum = (sum + dp[j]) % mod;
  }
  cout << sum << endl;
  return 0;
}
