#include <bits/stdc++.h>
using namespace std;
int nxt() {
  int first;
  scanf("%d", &first);
  return first;
}
const int N = 1000 * 1000 * 2 + 10;
char t[N];
const long long mod = 1000 * 1000 * 1000 + 7;
long long dp[N];
long long sum[N];
int last[26];
void solve() {
  int n = nxt();
  int k = nxt();
  scanf("%s", t);
  int m = (int)strlen(t);
  int ls[k];
  memset(ls, -1, sizeof(ls));
  for (int i = 0; i < m; ++i) {
    ls[t[i] - 'a'] = i;
  }
  int len = m;
  for (int i = 0; i < n; ++i) {
    int id = 0;
    for (int j = 0; j < k; ++j) {
      if (ls[id] > ls[j]) {
        id = j;
      }
    }
    ls[id] = len;
    t[len++] = char('a' + id);
  }
  dp[0] = 1;
  sum[0] = 1;
  memset(last, -1, sizeof(last));
  for (int i = 0; i < len; ++i) {
    if (last[t[i] - 'a'] == -1) {
      dp[i + 1] = sum[i];
    } else {
      dp[i + 1] = sum[i] - sum[last[t[i] - 'a']];
      if (dp[i + 1] < 0) dp[i + 1] += mod;
    }
    sum[i + 1] = sum[i] + dp[i + 1];
    if (sum[i + 1] >= mod) sum[i + 1] -= mod;
    last[t[i] - 'a'] = i;
  }
  cout << sum[len] << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  for (int i = 0; i < (int)(t); i++) {
    solve();
  }
  return 0;
}
