#P1910I. Inverse Problem

    ID: 10298 Type: RemoteJudge 2000ms 256MiB Tried: 0 Accepted: 0 Difficulty: 10 Uploaded By: Tags>*special problemcombinatoricsdp*2700

Inverse Problem

Description

Consider the following problem.

You are given a string ss, consisting of nn lowercase Latin letters, and an integer kk (nn is not divisible by kk). Each letter is one of the first cc letters of the alphabet.

You apply the following operation until the length of the string is less than kk: choose a contiguous substring of the string of length exactly kk, remove it from the string and glue the resulting parts together without changing the order.

Let the resulting string of length smaller than kk be tt. What is lexicographically smallest string tt that can obtained?

You are asked the inverse of this problem. Given two integers nn and kk (nn is not divisible by kk) and a string tt, consisting of (nmodkn \bmod k) lowercase Latin letters, count the number of strings ss that produce tt as the lexicographically smallest solution.

Print that number modulo 998244353998\,244\,353.

The first line contains three integers n,kn, k and cc (1n1061 \le n \le 10^6; 2k1062 \le k \le 10^6; 1c261 \le c \le 26; nn is not divisible by kk) — the length of string ss, the length of the substring that is being removed and the number of first letters from the alphabet.

The second line contains string tt, consisting of exactly (nmodkn \bmod k) lowercase Latin letters. Each letter is one of the first cc letters of the alphabet.

Print a single integer — the number of strings ss that produce tt as the lexicographically smallest solution.

Input

The first line contains three integers n,kn, k and cc (1n1061 \le n \le 10^6; 2k1062 \le k \le 10^6; 1c261 \le c \le 26; nn is not divisible by kk) — the length of string ss, the length of the substring that is being removed and the number of first letters from the alphabet.

The second line contains string tt, consisting of exactly (nmodkn \bmod k) lowercase Latin letters. Each letter is one of the first cc letters of the alphabet.

Output

Print a single integer — the number of strings ss that produce tt as the lexicographically smallest solution.

Sample Input 1

3 2 2
a

Sample Output 1

6

Sample Input 2

5 3 3
bc

Sample Output 2

15

Sample Input 3

34 12 26
codeforces

Sample Output 3

988024123

Sample Input 4

5 3 1
aa

Sample Output 4

1

Note

The strings ss in the first example: "aaa", "aab", "aba", "abb", "baa", "bba".

The strings ss in the second example: "bcabc", "bcacc", "bcbbc", "bcbcc", "bccbc", "bcccc", "caabc", "cabbc", "cacbc", "cbabc", "cbbbc", "cbcbc", "ccabc", "ccbbc", "cccbc".