#include <bits/stdc++.h>
using namespace std;
struct Modint {
  int val;
  Modint(int nval = 0) { val = nval; }
  Modint& operator+=(Modint r) {
    val = (val + r.val) % 1000000007;
    return *this;
  }
  Modint operator+(Modint r) { return Modint(*this) += r; }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  string t;
  cin >> n >> k >> t;
  vector<Modint> seqs(1, 0);
  vector<int> last(k, 0);
  for (int c : t) {
    c -= 'a';
    seqs.push_back(1);
    for (auto l : last) seqs.back() += seqs[l];
    last[c] = seqs.size() - 1;
  }
  for (int i = 0; i < n; i++) {
    int mn = 0;
    for (int j = 1; j < k; j++)
      if (last[j] < last[mn]) mn = j;
    seqs.push_back(1);
    for (auto l : last) seqs.back() += seqs[l];
    last[mn] = seqs.size() - 1;
  }
  Modint result;
  for (auto l : last) result += seqs[l];
  cout << result.val + 1 << '\n';
  return 0;
}
