#include <bits/stdc++.h>
using namespace std;
const int K = 30, mod = 1e9 + 7;
int n, m, k, dp[K], last[K], s = 1;
string t;
int sum(int a, int b) { return ((1LL * a + b) % mod + mod) % mod; }
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> k >> t;
  m = t.size();
  memset(last, -1, sizeof last);
  for (int i = 0; i < m; i++) {
    int tmp = s;
    s = sum(s, sum(s, -dp[t[i] - 'a']));
    dp[t[i] - 'a'] = tmp;
    last[t[i] - 'a'] = i;
  }
  for (int i = 0; i < n; i++) {
    int idx = min_element(last, last + k) - last;
    int tmp = s;
    s = sum(s, sum(s, -dp[idx]));
    dp[idx] = tmp;
    last[idx] = i + m;
  }
  return cout << s << endl, 0;
}
