#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:268435456")
using namespace std;
template <typename T>
T sqr(const T &x) {
  return x * x;
}
template <typename T>
T my_abs(const T &x) {
  return x < 0 ? -x : x;
}
const int INF = (int)1e9;
const long long LINF = (long long)6e18;
const long long INF64 = LINF;
const long long INFLL = LINF;
const long double EPS = 1e-8;
const long double PI = 3.1415926535897932384626433832795;
const long double ME = 1e-5;
const long long MOD = (int)1e9 + 7;
const long long MOD2 = (int)1e9 + 21;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
const int SQN = 400;
const int LOGN = 20;
const int N = (int)1e6 + 10;
const int M = (int)1e5 + 10;
char s[N];
long long pr[26];
int pos[26];
void solve() {
  memset(pos, -1, sizeof(pos));
  int n, k;
  scanf("%d %d\n", &n, &k);
  scanf("%s", &s);
  int m = strlen(s);
  long long ans = 1;
  for (int i = 0; i < int(m); ++i) {
    long long cpr = ans;
    ans = (((ans * (long long)2 - pr[s[i] - 'a']) % MOD) + MOD) % MOD;
    pr[s[i] - 'a'] = cpr;
    pos[s[i] - 'a'] = i;
  }
  vector<pair<int, int> > l;
  for (int i = 0; i < int(k); ++i) {
    l.push_back(make_pair(pos[i], i));
  }
  sort(l.begin(), l.end());
  int idx = 0;
  for (int i = int(m); i < int(m + n); ++i) {
    int best = l[idx].second;
    long long cpr = ans;
    ans = (((ans * (long long)2 - pr[best]) % MOD) + MOD) % MOD;
    pr[best] = cpr;
    pos[best] = i;
    idx = (idx + 1) % k;
  }
  cout << ans << endl;
}
int main() {
  srand((unsigned int)time(NULL));
  cout << setprecision(10) << fixed;
  solve();
  return 0;
}
