#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, k;
string s;
int m;
int ans[2222222];
void add(int &a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
int wefijodfhiuerijo[33];
int tot[33];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  cin >> s;
  m = s.size();
  for (int j = 0; j < k; ++j) {
    wefijodfhiuerijo[j] = -1;
  }
  int sum = 1;
  for (int i = 0; i < m; ++i) {
    ans[i] = sum;
    if (wefijodfhiuerijo[s[i] - 'a'] != -1) {
      ans[i] -= tot[s[i] - 'a'];
      if (ans[i] < 0) ans[i] += mod;
    }
    wefijodfhiuerijo[s[i] - 'a'] = i;
    add(tot[s[i] - 'a'], ans[i]);
    add(sum, ans[i]);
  }
  for (int i = 0; i < n; ++i) {
    ans[i + m] = sum;
    int ch = -2;
    for (int j = 0; j < k; ++j) {
      if (ch == -2 || wefijodfhiuerijo[j] < wefijodfhiuerijo[ch]) {
        ch = j;
      }
    }
    if (wefijodfhiuerijo[ch] != -1) {
      ans[i + m] -= tot[ch];
      if (ans[i + m] < 0) ans[i + m] += mod;
    }
    wefijodfhiuerijo[ch] = i + m;
    add(sum, ans[i + m]);
    add(tot[ch], ans[i + m]);
  }
  cout << sum << endl;
  return 0;
}
