{"raw_statement":[{"iden":"problem statement","content":"Given is a string $S$. How many different strings can be obtained as a permutation of a non-empty, **not necessarily contiguous** subsequence of $S$?\nSince the count can be enormous, print it modulo $998244353$."},{"iden":"constraints","content":"*   $S$ is a string of length $1$ and $5000$ (inclusive) consisting of lowercase English letters."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$S$"},{"iden":"sample input 1","content":"aab"},{"iden":"sample output 1","content":"8\n\nThere are $8$ different strings that can be obtained as a permutation of a subsequence of $S$: `a`, `b`, `aa`, `ab`, `ba`, `aab`, `aba`, `baa`."},{"iden":"sample input 2","content":"aaa"},{"iden":"sample output 2","content":"3"},{"iden":"sample input 3","content":"abcdefghijklmnopqrstuvwxyz"},{"iden":"sample output 3","content":"149621752\n\nBe sure to print the count modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}