#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const int MAXN = 3e6 + 10;
const long long mod = (long long)1e9 + 7;
int last[26];
int dp[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int toAdd, k;
  cin >> toAdd >> k;
  string s;
  cin >> s;
  memset(last, -1, sizeof(last));
  for (int i = 0; i < s.size(); i++) {
    last[s[i] - 'a'] = i;
  }
  for (int i = 0; i < toAdd; i++) {
    int which = 0;
    int mn = INF;
    for (int j = 0; j < k; j++) {
      if (last[j] < mn) {
        mn = last[j];
        which = j;
      }
    }
    s += (char)('a' + which);
    last[which] = (int)s.size() - 1;
  }
  dp[0] = 1;
  memset(last, 0, sizeof(last));
  for (int i = 1; i <= s.size(); i++) {
    dp[i] = (dp[i - 1] * 2) % mod;
    if (last[s[i - 1] - 'a'] != 0) {
      dp[i] -= dp[last[s[i - 1] - 'a'] - 1];
      if (dp[i] < 0) {
        dp[i] += mod;
      }
    }
    last[s[i - 1] - 'a'] = i;
  }
  cout << dp[s.size()] << endl;
  return 0;
}
