#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
inline string get() {
  char ch[2000010];
  scanf("%s", ch);
  return ch;
}
const int MAX_LG = 21;
const long long maxn = 1e6 + 10;
const long long maxm = 1e5 + 10;
const long long base = 29;
const long long mod = 1e9 + 7;
const long long INF = 1e9 + 100;
const long long SQ = 317;
pair<long long, long long> dp[30];
long long lst[maxn];
long long dp2[30];
inline bool cmp(const pair<long long, long long> &a,
                const pair<long long, long long> &b) {
  return lst[a.second] < lst[b.second];
}
int32_t main() {
  long long n = in(), k = in();
  string s = get();
  long long m = s.size();
  for (long long i = 0; i < k; i++) dp[i].second = i;
  memset(lst, -1, sizeof lst);
  for (long long i = 0; i < m; i++) {
    long long ch = s[i] - 'a';
    for (long long j = 0; j < k; j++) {
      if (j == ch) continue;
      dp[ch].first = (dp[j].first + dp[ch].first) % mod;
    }
    dp[ch].first = (dp[ch].first + 1) % mod;
    lst[ch] = i;
  }
  for (long long i = 0; i < k; i++) dp2[i] = dp[i].first;
  sort(dp, dp + k, cmp);
  for (long long i = 0; i < n; i++) {
    long long ch = dp[i % k].second;
    for (long long j = 0; j < k; j++) {
      if (j == ch) continue;
      dp2[ch] = (dp2[j] + dp2[ch]) % mod;
    }
    dp2[ch] = (dp2[ch] + 1) % mod;
  }
  long long tot = 0;
  for (long long i = 0; i < k; i++) {
    tot = (tot + dp2[i]) % mod;
  }
  cout << (tot + 1) % mod << "\n";
}
