func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, k;   char s[1000111];   pair<int, int> q[33];   int a[33];   int main() {     scanf( %d%d n , &n, &k);     gets(s);     int l = strlen(s);     for (int i = 0; i < k; i++) q[i].second = i;     long long sum = 1;     for (int i = 0; i < l; i++) {       int u = s[i] -  a ;       q[u].first = i + 1;       long long t = (sum - a[u] + 1000000007) % 1000000007;       sum = (sum + t) % 1000000007;       a[u] = (a[u] + t) % 1000000007;     }     sort(q, q + k);     for (int i = 0; i < n; i++) {       int u = q[i % k].second;       long long t = (sum - a[u] + 1000000007) % 1000000007;       sum = (sum + t) % 1000000007;       a[u] = (a[u] + t) % 1000000007;     }     cout << sum << endl;     return 0;   }   