#include <bits/stdc++.h>
using namespace std;
const int N = 1000123;
const int K = 101;
const int MOD = 1000000007;
int z, n, m, k;
string s;
int a[K];
int last[K];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  cin >> s;
  m = s.size();
  for (int i = 0; i < k; i++) last[i] = -1;
  long long sum = 0;
  for (int i = 0; i < m; i++) {
    int old = a[s[i] - 'a'];
    a[s[i] - 'a'] = (sum + 1) % MOD;
    sum += ((sum + 1) - old + MOD) % MOD;
    sum %= MOD;
    last[s[i] - 'a'] = i;
  }
  vector<pair<int, int> > v;
  for (int i = 0; i < k; i++) {
    v.push_back({last[i], i});
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < n; i++) {
    int old = a[v[i % k].second];
    a[v[i % k].second] = (sum + 1) % MOD;
    sum += ((sum + 1) - old + MOD) % MOD;
    sum %= MOD;
  }
  cout << (sum + 1) % MOD << endl;
}
