#include <bits/stdc++.h>
long long mod = 1e9 + 7;
void shrink_to_mod(long long& value) { value = (value % mod + mod) % mod; }
long long count_distinct_subsequences(const std::string& string, int k) {
  std::vector<long long> subs_ending_here(string.size() + 1);
  std::vector<long long> prefix_sums(string.size() + 1);
  std::vector<int> last_position(k, 0);
  subs_ending_here[0] = 1;
  prefix_sums[0] = 1;
  for (int i = 1; i <= string.size(); ++i) {
    long long ending_here =
        (i > 0 ? prefix_sums[i - 1] : 0) -
        (last_position[string[i - 1] - 'a'] > 0
             ? prefix_sums[last_position[string[i - 1] - 'a'] - 1]
             : 0);
    shrink_to_mod(ending_here);
    subs_ending_here[i] = ending_here;
    prefix_sums[i] = (i > 0 ? prefix_sums[i - 1] : 0) + ending_here;
    shrink_to_mod(prefix_sums[i]);
    last_position[string[i - 1] - 'a'] = i;
  }
  return prefix_sums.back();
}
int main() {
  int n, k;
  std::cin >> n >> k;
  std::string first_part;
  std::cin >> first_part;
  std::vector<int> last_position(k, -1);
  for (int i = 0; i < first_part.size(); ++i) {
    last_position[first_part[i] - 'a'] = i;
  }
  std::string second_part(n, 'a');
  for (int i = 0; i < n; ++i) {
    int min_index = 0;
    int min_value = last_position[min_index];
    for (int j = 0; j < k; ++j) {
      if (last_position[j] < min_value) {
        min_index = j;
        min_value = last_position[j];
      }
    }
    second_part[i] = min_index + 'a';
    last_position[min_index] = first_part.size() + i;
  }
  std::cout << count_distinct_subsequences(first_part + second_part, k);
  return 0;
}
