#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 2e6 + 10;
const int MOD = 1e9 + 7;
int last[26], ch[26];
long long dp[26], sum;
char s[MAXN];
int main() {
  int n, k;
  cin >> n >> k;
  scanf("%s", s + 1);
  int m = strlen(s + 1);
  for (int i = 1; i <= m; i++) {
    int x = s[i] - 'a';
    sum -= dp[x];
    dp[x] += sum + 1;
    sum += dp[x];
    sum %= MOD;
    dp[x] %= MOD;
    last[x] = i;
  }
  for (int i = 0; i < k; i++) {
    ch[i] = i;
  }
  sort(ch, ch + k,
       [](const int& a, const int& b) -> bool { return last[a] < last[b]; });
  for (int i = 1; i <= n; i++) {
    int x = ch[(i - 1) % k];
    sum -= dp[x];
    dp[x] += sum + 1;
    sum += dp[x];
    sum %= MOD;
    dp[x] %= MOD;
  }
  cout << ((sum + 1) % MOD + MOD) % MOD << endl;
}
