#include <bits/stdc++.h>
using namespace std;
const long long linf = 10000000000000043;
const int inf = 1000000043;
void pause(bool a = true) {}
template <class T>
inline const T sqr(const T &x) {
  return x * x;
}
template <class T>
inline T dist(pair<T, T> a, pair<T, T> b) {
  return sqrt(sqr(a.first - b.first) + sqr(a.second - b.second));
}
template <class T>
inline T prod(pair<T, T> a, pair<T, T> b, pair<T, T> c = make_pair(0, 0)) {
  return (a.first - c.first) * (b.second - c.second) -
         (a.second - c.second) * (b.first - c.first);
}
template <class T>
inline T prodv(pair<T, T> a, pair<T, T> b, pair<T, T> c = make_pair(0, 0)) {
  return (a.first - c.first) * (b.first - c.first) +
         (a.second - c.second) * (b.second - c.second);
}
template <class T>
inline bool intriangle(pair<T, T> a, pair<T, T> b, pair<T, T> c, pair<T, T> d) {
  return (abs(prod(a, b, c)) ==
          abs(prod(a, b, d)) + abs(prod(a, c, d)) + abs(prod(b, c, d)));
}
template <class T>
inline int sg(T a) {
  return (a < 0 ? -1 : a ? 1 : 0);
}
long long rng(long long a, long long b) {
  return (((((long long)rand()) << 16) + rand()) % (b - a + 1)) + a;
}
bool inConvPoly(const vector<pair<long long, long long>> &a,
                pair<long long, long long> b) {
  long long l = 1;
  long long r = a.size() - 1;
  if (sg(prod(a[l], b, a[0])) * sg(prod(a[r], b, a[0])) >= 0) return false;
  if (intriangle(a[l], a[r], a[0], b)) return true;
  while (l != r - 1)
    (prod(a[(l + r) / 2], b, a[0]) < 0) ? l = (l + r) / 2 : r = (l + r) / 2;
  return sg(prod(b, a[r], a[l])) * sg(prod(b, a[0], a[l])) < 0;
}
template <class T>
T mex(vector<T> a) {
  set<T> b(a.begin(), a.end());
  for (int i = 0;; ++i)
    if (!b.count(i)) return i;
}
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long popcnt(long long mask) {
  long long cnt = 0;
  while (mask) cnt += mask % 2, mask /= 2;
  return cnt;
}
unsigned long long powi(unsigned long long a, unsigned long long b,
                        long long mod = 1000000007) {
  if (b < 2) return b ? a : 1;
  return (powi((a * a) % mod, b / 2, mod) * (b % 2 ? a : 1LL)) % mod;
}
bool isn(char c) { return ('0' <= c && c <= '9'); }
template <class T>
bool read(T &out) {
  int c = getchar(), sign = 1;
  T num = 0;
  for (; !isn(c) && c != '-'; c = getchar())
    if (c == EOF) return false;
  if (c == '-') {
    sign = -1;
    c = getchar();
  }
  if (c == EOF) return false;
  for (; isn(c); c = getchar()) num = num * 10 + c - '0';
  out = sign * num;
  return true;
}
long long time_limit = 1000000;
long long start = clock();
bool time_break() {
  int g = clock();
  return (clock() - start > time_limit * 0.9);
}
long long fact(long long n, long long mod = linf) {
  long long g = 1;
  for (int i = 0; i < (n); i++) g *= (i + 1);
  return g;
}
void init(long long tl = 1000000) {
  ios::sync_with_stdio(false);
  srand(time(0));
  time_limit = tl;
}
template <class T>
bool maxz(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool minz(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool maxze(T &a, T b) {
  if (a <= b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool minze(T &a, T b) {
  if (a >= b) {
    a = b;
    return true;
  }
  return false;
}
long long mod7 = 1000000007;
long long mod9 = 1000000009;
bool isprime(long long n) {
  if (n < 2) return 0;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
long long randLL() {
  return (((long long)rand()) << 47) + (((long long)rand()) << 31) +
         (((long long)rand()) << 15) + (((long long)rand()) >> 1);
}
bool isprimeL(long long n, int it = 50) {
  if (n < 2) return 0;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (int i = 0; i < (it); i++) {
    long long x = randLL() % (n - 1) + 1;
    if (gcd(x, n) != 1) return 0;
    if (powi(x, n - 1, n) != 1) return 0;
  }
  return 1;
}
long long n;
vector<vector<long long>> g;
vector<pair<long long, long long>> e;
vector<long long> power;
vector<long long> used;
void dfs(long long v) {
  used[v] = true;
  for (int i = 0; i < (g[v].size()); i++) {
    long long to = g[v][i];
    if (!used[to]) {
      dfs(to);
    }
    maxz(power[v], power[to] + 1);
  }
}
bool check(long long cnt) {
  for (int i = 0; i < (n); i++) g[i].clear();
  for (int i = 0; i < (cnt); i++) {
    g[e[i].first].push_back(e[i].second);
  }
  used.assign(n, 0);
  power.assign(n, 0);
  for (int i = 0; i < (n); i++)
    if (!used[i]) dfs(i);
  set<long long> tot((power).begin(), (power).end());
  return tot.size() == n;
}
int main() {
  ios::sync_with_stdio(false);
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  long long m = s.length();
  for (int i = 0; i < (m); i++) s[i] -= 'a';
  vector<long long> d(n + m, 0);
  d[0] = 2;
  vector<long long> c(k, 0);
  c[s[0]] = 1;
  vector<long long> last(k, -1);
  last[s[0]] = 0;
  for (int i = 1; i < (m); i++) {
    d[i] = (d[i - 1] * 2 - c[s[i]] + mod7 * 2) % mod7;
    c[s[i]] = d[i - 1];
    last[s[i]] = i;
  }
  for (int i = 0; i < (n); i++) {
    long long best = last[0];
    long long let = 0;
    for (int j = 0; j < (k); j++) {
      if (minz(best, last[j])) let = j;
    }
    d[m + i] = (d[m + i - 1] * 2 - c[let] + mod7 * 2) % mod7;
    c[let] = d[m + i - 1];
    last[let] = m + i;
  }
  cout << d[n + m - 1] << endl;
  pause(1);
  return 0;
}
