#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int n, k;
string s;
int lt[256];
long long dp[2000006];
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> k;
  cin >> s;
  memset(lt, -1, sizeof(lt));
  for (int i = 1; i <= s.size(); i++) {
    if (lt[s[i - 1]] == -1) {
      dp[i] = (dp[i - 1] * 2 + 1) % mod;
      lt[s[i - 1]] = i;
    } else {
      dp[i] = (dp[i - 1] * 2 - dp[lt[s[i - 1]] - 1] + mod) % mod;
      lt[s[i - 1]] = i;
    }
  }
  int dst = s.size() + n;
  for (int i = s.size() + 1; i <= dst; i++) {
    char res;
    int cur = 1e9;
    for (char c = 'a'; c <= 'a' + k - 1; c++) {
      if (lt[c] < cur) {
        cur = lt[c];
        res = c;
      }
    }
    if (lt[res] == -1) {
      dp[i] = (dp[i - 1] * 2 + 1) % mod;
      lt[res] = i;
    } else {
      dp[i] = (dp[i - 1] * 2 - dp[lt[res] - 1] + mod) % mod;
      lt[res] = i;
    }
    s += res;
  }
  cout << (dp[dst] + 1) % mod << endl;
  return 0;
}
