#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007LL;
int n, k;
string s;
long long A[30];
long long ans, aux;
int last[30];
int main() {
  cin >> n >> k >> s;
  memset(last, -1, sizeof(last));
  int m = s.length();
  ans = 1LL;
  for (int i = 0; i < m; i++) {
    aux = ans;
    ans = (2 * ans + MOD - A[s[i] - 'a']) % MOD;
    A[s[i] - 'a'] = aux;
    last[s[i] - 'a'] = i;
  }
  for (int j = 0; j < n; j++) {
    int mini = (1 << 30);
    int let;
    for (int i = 0; i < k; i++) {
      if (last[i] < mini) {
        mini = last[i];
        let = i;
      }
    }
    aux = ans;
    ans = (2 * ans + MOD - A[let]) % MOD;
    A[let] = aux;
    last[let] = m + j;
  }
  cout << ans << endl;
}
