#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace::std; template ostream& operator<< (ostream& o, const pair& p) { o << "<" << p.first << ", " << p.second << ">"; return o; } template ostream& operator<< (ostream& o, const vector& v) { for (const auto& x : v) o << x << " "; return o; } template ostream& operator<< (ostream& o, const set& v) { for (const auto& x : v) o << x << " "; return o; } template ostream& operator<< (ostream& o, const deque& v) { for (const auto& x : v) o << x << " "; return o; } template ostream& operator<<(ostream& o, const unordered_map& m) { o << "{"; for (const auto& [k, v] : m) o << " " << k << ": " << v << ","; o << "}"; return o; } template istream& operator>> (istream& i, vector& v) { for (auto& x : v) i >> x; return i; } istream& operator>> (istream& i, pair& p) { i >> p.first >> p.second; return i; } int main() { ios::sync_with_stdio(false); long long n, m, k; string s; cin >> n >> m >> k >> s; const long long p = 998244353; long long r = 0; bitset<32> present; vector> lowered(m + 1, vector('z' - 'a' + 1)); for (int l = 1; l <= m; ++l) { if (l <= n) { char c = s[l - 1]; int i = c - 'a'; bitset<32> lower = (1 << i) - 1; lowered[l][present.count()] += (lower & present).count(); lowered[l][present.count()] %= p; lowered[l][present.count() + 1] += (lower & ~present).count(); lowered[l][present.count() + 1] %= p; present.set(i); } for (int j = 0; j <= ('z' - 'a' + 1); ++j) { lowered[l][j] += (lowered[l - 1][j] * j) % p; lowered[l][j] %= p; if (j > 0) { lowered[l][j] += (lowered[l - 1][j - 1] * ('z' - 'a' + 1 - (j - 1))) % p; lowered[l][j] %= p; } } for (int j = k; j <= ('z' - 'a' + 1); ++j) r = (r + lowered[l][j]) % p; } //cerr << lowered << endl; cout << r << endl; return 0; }