#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool smin(T &a, const T &b) {
  return b < a ? a = b, 1 : 0;
}
template <typename T>
inline bool smax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
const long long N = 26, mod = (long long)1e9 + 7;
long long n, k, dp[N], last[N];
string s;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  memset(last, -1, sizeof last);
  cin >> n >> k >> s;
  long long m = (long long)s.size();
  for (long long j = 0; j < m; ++j) {
    long long c = s[j] - 'a';
    last[c] = j;
    long long sum = 0;
    for (long long i = 0; i < k; ++i) {
      sum += dp[i];
      if (sum >= mod) sum -= mod;
    }
    dp[c] = (sum + 1) % mod;
  }
  for (long long j = 0; j < n; ++j) {
    long long c = 0;
    for (long long i = 0; i < k; ++i)
      if (last[i] < last[c]) c = i;
    last[c] = j + m;
    long long sum = 0;
    for (long long i = 0; i < k; ++i) {
      sum += dp[i];
      if (sum >= mod) sum -= mod;
    }
    dp[c] = (sum + 1) % mod;
  }
  long long res = 1;
  for (long long i = 0; i < k; ++i) {
    res += dp[i];
    if (res >= mod) res -= mod;
  }
  cout << res << '\n';
}
