#include <bits/stdc++.h>
using namespace std;
struct letter {
  int ind;
  char p;
};
bool my(letter a, letter b) { return a.ind < b.ind; }
int main() {
  int n, k, m;
  long long int c = 1000000007;
  cin >> n >> k;
  string s;
  cin >> s;
  m = s.size();
  vector<letter> L(k);
  for (int i = 0; i != k; i++) {
    L[i].ind = 0;
    L[i].p = 'a' + i;
  }
  vector<long long int> dp(n + 1 + m);
  dp[0] = 1;
  for (int i = 0; i != m; i++) {
    dp[i + 1] = 2 * dp[i];
    dp[i + 1] = dp[i + 1] % (c);
    if (L[s[i] - 'a'].ind != 0) {
      dp[i + 1] = dp[i + 1] + c - dp[L[s[i] - 'a'].ind - 1];
      dp[i + 1] = dp[i + 1] % (c);
    }
    L[s[i] - 'a'].ind = i + 1;
  }
  sort(L.begin(), L.end(), my);
  for (int j = 0, cnt = 0; j != n; j++, cnt++) {
    if (cnt == k) {
      cnt = 0;
    }
    dp[m + j + 1] = 2 * dp[m + j];
    dp[m + j + 1] = dp[m + j + 1] % (c);
    if (L[cnt].ind != 0) {
      dp[m + j + 1] = dp[m + j + 1] + c - dp[L[cnt].ind - 1];
      dp[m + j + 1] = dp[m + j + 1] % (c);
    }
    L[cnt].ind = m + j + 1;
  }
  cout << dp[m + n] << endl;
}
