#include #include #include using namespace std; #define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i=i##_begin_;i--) #define REP(i, n) FOR(i,0,n) #define IREP(i, n) IFOR(i,0,n) #include using mint = atcoder::modint998244353; int main() { int N, M, K; string S; cin >> N >> M >> K >> S; constexpr int D = 26; vector dp(D + 1); set se; mint ret = 0; REP(i, M) { IREP(d, D + 1) { if (d + 1 <= D) dp.at(d + 1) += dp.at(d) * (D - d); dp.at(d) *= d; } if (i < N) { const int ci = S.at(i) - 'a'; const int cnt = se.size(); REP(d, ci) { dp.at(cnt + !se.count('a' + d)) += 1; } } if (i < N) se.insert(S.at(i)); FOR(k, K, D + 1) ret += dp.at(k); if (i + 1 < N and (int)se.size() >= K) ret += 1; } cout << ret.val() << '\n'; }