#include <bits/stdc++.h>
const int INF = 2e9;
const long long LINF = 8e18;
const int MOD = 1e9 + 7;
using namespace std;
const int MAXN = 300001;
long long rs[27];
long long sum;
int luse[27];
set<pair<int, int> > mm;
int inc = 1;
int main() {
  ios_base::sync_with_stdio(false);
  fill(rs, rs + 27, 0);
  rs[0] = sum = 1;
  int n, k;
  string s;
  cin >> n >> k >> s;
  for (int i = 1; i <= k; i++) {
    mm.insert({0, i});
  }
  for (auto x : s) {
    int nm = x - 'a' + 1;
    long long prv = rs[nm];
    rs[nm] = sum;
    sum = (sum * 2 + MOD - prv) % MOD;
    mm.erase({luse[nm], nm});
    mm.insert({luse[nm] = inc++, nm});
  }
  for (int i = 0; i < n; i++) {
    int nm = mm.begin()->second;
    long long prv = rs[nm];
    rs[nm] = sum;
    sum = (sum * 2 + MOD - prv) % MOD;
    mm.erase({luse[nm], nm});
    mm.insert({luse[nm] = inc++, nm});
  }
  cout << sum;
  return 0;
}
