#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > pq;
long long dp[123], pos[123];
int main() {
  std::ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  long long ans = 0;
  int i, val;
  string s;
  long long newans = 0;
  cin >> s;
  for (i = 0; i < k; i++) {
    pq.insert(make_pair(-1, i));
    pos[i] = -1;
  }
  for (i = 0; i < s.length(); i++) {
    val = s[i] - 'a';
    pq.erase(make_pair(pos[val], val));
    pos[val] = i;
    pq.insert(make_pair(pos[val], val));
    newans = ans - dp[val] + ans + 1;
    newans %= (1000 * 1000 * 1000 + 7);
    dp[val] = ans + 1;
    dp[val] %= (1000 * 1000 * 1000 + 7);
    ans = newans;
  }
  long long mini, j;
  int m = s.length();
  set<pair<int, int> >::iterator it;
  for (i = 0; i < n; i++) {
    it = pq.begin();
    val = it->second;
    mini = (1000 * 1000 * 1000 + 5);
    pq.erase(make_pair(pos[val], val));
    pos[val] = i + m;
    pq.insert(make_pair(pos[val], val));
    newans = ans - dp[val] + ans + 1;
    newans %= (1000 * 1000 * 1000 + 7);
    dp[val] = ans + 1;
    dp[val] %= (1000 * 1000 * 1000 + 7);
    ans = newans;
  }
  ans++;
  ans %= (1000 * 1000 * 1000 + 7);
  ans += (1000 * 1000 * 1000 + 7);
  ans %= (1000 * 1000 * 1000 + 7);
  cout << ans << endl;
  return 0;
}
