#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int lst[26], res[26];
int sum;
void upd(int id, int now) {
  lst[id] = now;
  int prv = res[id];
  res[id] = (1 + sum) % MOD;
  sum = ((sum - prv + MOD) % MOD + res[id]) % MOD;
}
int main() {
  int n, k;
  string s;
  cin >> n >> k >> s;
  memset(lst, -1, sizeof(lst));
  for (int i = 0; i < (int)(s).size(); i++) upd(s[i] - 'a', i);
  for (int i = 0; i < n; i++)
    upd(min_element(lst, lst + k) - lst, (int)(s).size() + i);
  cout << (sum + 1) % MOD << endl;
  return 0;
}
