#include <bits/stdc++.h>
using namespace std;
int n, k, ans[2000005], pre[30];
string s;
int solve_for_given_letter_at_position(int idx) {
  int temp_ans = (ans[idx - 1] << 1) % 1000000007,
      temp_letter = s[idx - 1] - 'a';
  if (pre[temp_letter] > 0)
    temp_ans = (temp_ans - ans[pre[temp_letter] - 1] + 1000000007) % 1000000007;
  pre[temp_letter] = idx;
  return temp_ans;
}
int find_temp_letter() {
  int temp_letter = 0;
  for (int i = 0; i < k; i++)
    if (pre[temp_letter] > pre[i]) temp_letter = i;
  return temp_letter;
}
int solve_for_unknown_letter_at_position(int idx) {
  int temp_ans = (ans[idx - 1] << 1) % 1000000007,
      temp_letter = find_temp_letter();
  if (pre[temp_letter] > 0)
    temp_ans = (temp_ans - ans[pre[temp_letter] - 1] + 1000000007) % 1000000007;
  pre[temp_letter] = idx;
  return temp_ans;
}
int solve() {
  fill(pre, pre + k, 0);
  ans[0] = 1;
  for (int i = 1; i <= s.length(); i++) {
    ans[i] = solve_for_given_letter_at_position(i);
  }
  for (int i = s.length() + 1; i <= s.length() + n; i++) {
    ans[i] = solve_for_unknown_letter_at_position(i);
  }
  return ans[s.length() + n];
}
int main() {
  cin >> n >> k >> s;
  cout << solve() << endl;
  return 0;
}
