#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const long double PI = 3.1415926535897932384626433832795028841;
bool TST = 0;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= MOD;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % MOD;
    a = a * a % MOD;
  }
  return res;
}
void Show(int *QQ, int N) {
  if (not TST) {
    return;
  }
  for (int x = 0; x < N; x++) {
    cout << QQ[x];
    if (x != N - 1) {
      cout << ',';
    }
  }
  cout << '\n';
}
void ShowLL(long long *QQ, int N) {
  if (not TST) {
    return;
  }
  for (int x = 0; x < N; x++) {
    cout << QQ[x];
    if (x != N - 1) {
      cout << ',';
    }
  }
  cout << '\n';
}
int n, k;
string T;
long long A[37];
int O[37];
bool S[37];
bool compare(int a, int b) { return A[a] < A[b]; }
int main() {
  cin >> n >> k;
  cin >> T;
  long long sum = 0;
  int Tlen = T.size();
  vector<int> order;
  for (int i = 0; i < Tlen; i++) {
    int c = T[i] - 'a';
    long long last = A[c];
    long long ls = sum;
    A[c] = (sum + 1 + MOD) % MOD;
    sum = (sum - last + MOD) % MOD;
    sum = (sum + ls + 1 + MOD) % MOD;
    order.push_back(c);
  }
  int v = 0;
  for (int x = order.size() - 1; x >= 0; x--) {
    if (not S[order[x]]) {
      O[v] = order[x];
      S[order[x]] = 1;
      v++;
    }
  }
  for (int x = 0; x < k; x++) {
    if (not S[x]) {
      O[v] = x;
      S[x] = 1;
      v++;
    }
  }
  for (int i = 0; i < n; i++) {
    int a = i % k;
    a = k - a - 1;
    int v = O[a];
    long long last = A[v];
    long long ls = sum;
    A[v] = (sum + 1 + MOD) % MOD;
    sum = (sum - last + MOD) % MOD;
    sum = (sum + ls + 1 + MOD) % MOD;
  }
  cout << sum + 1 << '\n';
}
