#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e6 + 10;
long long int dp[MAXN], last[1000];
int main() {
  long long int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  long long int l = s.length();
  dp[0] = 1;
  long long int ma, ind = 0, mini;
  for (long long int i = 1; i < l + 1 + n; ++i) {
    dp[i] = (dp[i - 1] * 2LL);
    dp[i] %= 1000000007;
    if (i > l) {
      char x = 'a';
      ind = 0;
      mini = last[x - 97];
      for (long long int j = 0; j < k; ++j) {
        if (last[j] < mini) {
          mini = last[j];
          ind = j;
        }
      }
      s += (char)(ind + 97);
    }
    if (last[s[i - 1] - 97] != 0) dp[i] -= dp[last[s[i - 1] - 97] - 1];
    if (dp[i] < 0) {
      dp[i] += 1000000007;
    }
    last[s[i - 1] - 97] = i;
  }
  cout << dp[l + n] % 1000000007 << endl;
}
