{"raw_statement":[{"iden":"problem statement","content":"Takahashi has decided to put a web counter on his webpage.  \nThe accesses to his webpage are described as follows:\n\n*   For $i=0,1,2,\\ldots,23$, there is a possible access at $i$ o'clock every day:\n    *   If $c_i=$`T`, Takahashi accesses the webpage with a probability of $X$ percent.\n    *   If $c_i=$`A`, Aoki accesses the webpage with a probability of $Y$ percent.\n    *   Whether or not Takahashi or Aoki accesses the webpage is determined independently every time.\n*   There is no other access.\n\nAlso, Takahashi believes it is preferable that the $N$\\-th access since the counter is put is not made by Takahashi himself.\nIf Takahashi puts the counter **right before $0$ o'clock** of one day, find the probability, modulo $998244353$, that the $N$\\-th access is made by Aoki."},{"iden":"notes","content":"We can prove that the sought probability is always a finite rational number. Moreover, under the constraints of this problem, when the value is represented as $\\frac{P}{Q}$ with two coprime integers $P$ and $Q$, we can prove that there is a unique integer $R$ such that $R \\times Q \\equiv P\\pmod{998244353}$ and $0 \\leq R \\lt 998244353$. Find this $R$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^{18}$\n*   $1 \\leq X,Y \\leq 99$\n*   $c_i$ is `T` or `A`.\n*   $N$, $X$, and $Y$ are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $X$ $Y$\n$c_0 c_1 \\ldots c_{23}$"},{"iden":"sample input 1","content":"1 50 50\nATATATATATATATATATATATAT"},{"iden":"sample output 1","content":"665496236\n\nThe $1$\\-st access since Takahashi puts the web counter is made by Aoki with a probability of $\\frac{2}{3}$."},{"iden":"sample input 2","content":"271 95 1\nTTTTTTTTTTTTTTTTTTTTTTTT"},{"iden":"sample output 2","content":"0\n\nThere is no access by Aoki."},{"iden":"sample input 3","content":"10000000000000000 62 20\nATAATTATATTTAAAATATTATAT"},{"iden":"sample output 3","content":"744124544"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}