#include #include using namespace std; using namespace atcoder; typedef modint998244353 mint; typedef long long ll; #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define rrep(i, s, n) for (int i = (int)(n)-1; i >= (int)(s); i--) template bool chmin(T &a, const T &b) { if (a <= b) return false; a = b; return true; } template bool chmax(T &a, const T &b) { if (a >= b) return false; a = b; return true; } int main(){ // KETA DP // small ga kakutei siteiruka? // onaji nara? int n, m, k; cin >> n >> m >> k; string s; cin >> s; vector dp0(27); // small vector dp1(27); // not small int tmp = 0; vector snow(26); mint ans = 0; rep(num,0,m){ vector ndp0(27); // small vector ndp1(27); // not small rep(j,0,27){ if (j+1 <= 26) ndp0[j+1] += dp0[j] * (26-j); ndp0[j] += dp0[j] * j; } if (num < n){ rep(j,0,(int)(s[num] - 'a')){ if (snow[j]) ndp0[tmp]++; else ndp0[tmp+1]++; //rep(k,0,27){ // if (snow[j]) ndp0[k] += dp1[k]; // else ndp0[k+1] += dp1[k]; // } } if (snow[s[num] - 'a']) ndp1[tmp]++; else ndp1[tmp+1]++; if (!snow[s[num] - 'a']) tmp++; snow[s[num] - 'a'] = true; } dp0 = ndp0; dp1 = ndp1; rep(i,k,27){ ans += dp0[i]; if (num < n-1) ans += dp1[i]; } //cout << ans.val() << '\n'; } //if (tmp >= k) ans--; cout << ans.val() << '\n'; }