#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  string t;
  cin >> t;
  int m = t.size();
  vector<int> A(m + n);
  vector<pair<int, int> > SS(k);
  for (int i = 0; i < k; ++i) SS[i] = pair<int, int>(0, i);
  for (int i = 0; i < m; ++i) {
    int l = t[i] - 'a';
    SS[l] = pair<int, int>(i + 1, l);
    A[i] = l;
  }
  sort(SS.begin(), SS.end());
  for (int i = 0; i < n; ++i) {
    A[m + i] = SS[i % k].second;
  }
  long long Dp[n + m + 1];
  long long sum[n + m + 1];
  long long last[k];
  memset(last, -1, sizeof last);
  Dp[0] = 1;
  sum[0] = 1;
  for (int i = 0; i < m + n; ++i) {
    Dp[i + 1] = sum[i];
    if (last[A[i]] != -1) Dp[i + 1] = (Dp[i + 1] + mod - sum[last[A[i]]]) % mod;
    sum[i + 1] = (sum[i] + Dp[i + 1]) % mod;
    last[A[i]] = i;
  }
  cout << sum[n + m] << endl;
}
