#include <bits/stdc++.h>
using namespace std;
long long n, k, m;
string t;
long long last[30];
long long dp[30];
long long ans;
const long long MOD = 1e9 + 7;
void doit(long long c) {
  ans = ((ans - dp[c]) % MOD + MOD) % MOD;
  dp[c] = (ans + dp[c] + 1) % MOD;
  ans = (ans + dp[c]) % MOD;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k;
  cin >> t;
  t = "#" + t;
  m = t.size() - 1;
  for (long long i = 1; i <= m; i++) {
    long long c = t[i] - 'a' + 1;
    doit(c);
    last[c] = i;
  }
  for (long long i = 1; i <= n; i++) {
    long long p = 1e9;
    long long c = -1;
    for (long long j = 1; j <= k; j++) {
      if (p > last[j]) {
        p = last[j];
        c = j;
      }
    }
    doit(c);
    last[c] = m + i;
  }
  cout << (ans + 1) % MOD << endl;
  return 0;
}
