{"raw_statement":[{"iden":"problem statement","content":"You are given integers $A$, $B$, and $C$. How many strings $S$ consisting of `A`, `B`, and `C` satisfy all of the following conditions? Find the count modulo $998244353$.\n\n*   The number of occurrences of `A`, `B`, and `C` in $S$ are $A$, $B$, and $C$, respectively.\n*   $S$ contains none of `ABC`, `BCA`, and `CAB` as a (contiguous) substring."},{"iden":"constraints","content":"*   $1 \\leq A,B,C \\leq 10^6$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A$ $B$ $C$"},{"iden":"sample input 1","content":"1 1 1"},{"iden":"sample output 1","content":"3\n\nThe three strings that satisfy the conditions are `ACB`, `CBA`, and `BAC`."},{"iden":"sample input 2","content":"2 2 2"},{"iden":"sample output 2","content":"42"},{"iden":"sample input 3","content":"96 11 46"},{"iden":"sample output 3","content":"818015722"},{"iden":"sample input 4","content":"125132 102271 152064"},{"iden":"sample output 4","content":"128086069"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}