Filipp Rukhovich

아직 제출이 없습니다시간 제한6초메모리 제한512 MB

문제

The palindromicity of a sequence of characters tt of length kk is number of indices ii, such that 0i<ki10 \leq i < k - i - 1 and t_i=t_k1it\_i = t\_{k - 1 - i}. Note that 0-based indexing is used.

You are given a string ss. Count the sum of palindromicities over all its subsequences. Sequences which occur multiple times as a subsequence are counted multiple times (i.e. you sum palindromicities over all 2s2^{|s|} subsequences whether they are distinct or not).

Output the correct answer modulo 998244353998244353. Formally, if the actual answer is yy and your answer is xx, it will be considered correct if 263x<263-2^{63} \leq x < 2^{63} and xyx-y is divisible by 998244353998244353.

입력

The only line contains a non-empty string ss of lowercase latin letters with length not exceeding 123456123456.

출력

Output a single integer --- sum of palindromicities over all subsequences of ss modulo 998244353998244353.