#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000 * 1000 * 1000 + 7;
int main() {
  string s;
  int n, k;
  cin >> n >> k >> s;
  int m = s.size();
  vector<long long> dp(n + m + 1, 0);
  dp[0] = 1;
  vector<int> last(k, 0);
  vector<long long> ps(n + m + 1, 0);
  ps[0] = 1;
  for (int i = 1; i <= m + n; ++i) {
    int letter = 0;
    if (i <= m) {
      letter = s[i - 1] - 'a';
    } else {
      for (int j = 0; j < k; ++j) {
        if (last[j] < last[letter]) {
          letter = j;
        }
      }
    }
    dp[i] = (ps[i - 1] - (last[letter] ? ps[last[letter] - 1] : 0) + MOD) % MOD;
    ps[i] = (ps[i - 1] + dp[i]) % MOD;
    last[letter] = i;
  }
  cout << (ps[n + m]) % MOD << endl;
  return 0;
}
