#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e6 + 100;
const int MAXn = 2e3 + 100;
const int maxn = 2e2 + 100;
const int MAXK = 26;
const int D = 1e9 + 7;
int cnt[MAXK];
int Lst[MAXK];
vector<pair<int, int> > V;
vector<int> W[MAXK];
int dp[MAXN], nxt[MAXN][MAXK];
char inttochar(int i) { return i + 'a'; }
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int m = s.size();
  for (int i = 0; i < m; i++) {
    Lst[s[i] - 'a'] = i + 1;
  }
  for (int i = 0; i < k; i++) {
    V.push_back({Lst[i], i});
  }
  sort(V.begin(), V.end());
  for (int i = 0; i < n; i++) {
    s += inttochar(V[(i) % V.size()].second);
  }
  n = s.size();
  for (int i = 0; i < k; i++) {
    W[i].push_back(-1);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < k; j++) {
      nxt[i][j] = -1;
    }
  }
  for (int i = 0; i < n; i++) {
    int j = s[i] - 'a';
    int lst = W[j][W[j].size() - 1];
    W[j].push_back(i);
    for (int p = lst; p < i; p++) {
      nxt[p + 1][j] = i + 1;
    }
  }
  dp[0] = 1;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j < k; j++) {
      if (nxt[i][j] != -1) {
        dp[nxt[i][j]] += dp[i];
        dp[nxt[i][j]] %= D;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    Lst[s[i] - 'a'] = i + 1;
  }
  dp[0] = 1;
  int sum = 0;
  for (int i = 0; i <= n; i++) {
    sum += dp[i];
    sum %= D;
  }
  cout << sum << endl;
}
