#include <bits/stdc++.h>
using namespace std;
double abss(double a) {
  if (a < 0) return -a;
  return a;
}
int main() {
  long long ost = 1000000007;
  int n, k, m, d;
  cin >> n >> k;
  string s;
  cin >> s;
  vector<long long> x(k, 0);
  vector<bool> f(k, true);
  long long p = 1, q;
  m = s.length();
  for (int i = 0; i < m; i++) {
    d = int(s[i]) - int('a');
    q = p % ost;
    p = (q + p + ost - x[d]) % ost;
    x[d] = q;
  }
  vector<int> z;
  for (int i = m - 1; i >= 0; i--) {
    d = int(s[i]) - int('a');
    if (f[d]) {
      z.push_back(d);
      f[d] = false;
    }
  }
  for (int i = 0; i < k; i++) {
    if (f[i]) {
      z.push_back(i);
      f[i] = false;
    }
  }
  int j = k - 1;
  for (int i = 0; i < n; i++) {
    d = z[j];
    q = p % ost;
    p = (q + p + ost - x[d]) % ost;
    x[d] = q;
    j = (j + k - 1) % k;
  }
  cout << p;
  return 0;
}
