{"raw_statement":[{"iden":"problem statement","content":"You are given $N$, $Q$, and $A=(A_1,\\ldots,A_N)$.  \nProcess $Q$ queries, each of which is of one of the following two kinds:\n\n*   `1 x v`: update $A_x$ to $v$.\n*   `2 x`: let $B_i=\\sum_{j=1}^{i}A_j$, $C_i=\\sum_{j=1}^{i}B_j$, and $D_i=\\sum_{j=1}^{i}C_j$. Print $D_x$ modulo $998244353$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2\\times10^5$\n*   $1 \\leq Q \\leq 2\\times10^5$\n*   $0 \\leq A_i \\leq 10^9$\n*   $1 \\leq x \\leq N$\n*   $0 \\leq v \\leq 10^9$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format, where ${\\rm query}_i$ denotes the $i$\\-th query to be processed:\n\n$N$ $Q$\n$A_1$ $A_2$ $\\ldots$ $A_N$\n${\\rm query}_1$\n${\\rm query}_2$\n$\\vdots$\n${\\rm query}_Q$\n\nEach query is given in one of the following two formats:\n\n$1$ $x$ $v$\n\n$2$ $x$"},{"iden":"sample input 1","content":"3 3\n1 2 3\n2 3\n1 2 0\n2 3"},{"iden":"sample output 1","content":"15\n9\n\nWhen the $1$\\-st query is given, $A=(1,2,3)$, so $B=(1,3,6)$, $C=(1,4,10)$, and $D=(1,5,15)$; thus, $D_3=15$.\nWhen the $3$\\-rd query is given, $A=(1,0,3)$, so $B=(1,1,4)$, $C=(1,2,6)$, and $D=(1,3,9)$; thus, $D_3=9$."},{"iden":"sample input 2","content":"2 1\n998244353 998244353\n2 1"},{"iden":"sample output 2","content":"0"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}