#abc256f. [abc256_f]Cumulative Cumulative Cumulative Sum

[abc256_f]Cumulative Cumulative Cumulative Sum

Problem Statement

You are given NN, QQ, and A=(A1,ldots,AN)A=(A_1,\\ldots,A_N).
Process QQ queries, each of which is of one of the following two kinds:

  • 1 x v: update AxA_x to vv.
  • 2 x: let Bi=sumj=1iAjB_i=\\sum_{j=1}^{i}A_j, Ci=sumj=1iBjC_i=\\sum_{j=1}^{i}B_j, and Di=sumj=1iCjD_i=\\sum_{j=1}^{i}C_j. Print DxD_x modulo 998244353998244353.

Constraints

  • 1leqNleq2times1051 \\leq N \\leq 2\\times10^5
  • 1leqQleq2times1051 \\leq Q \\leq 2\\times10^5
  • 0leqAileq1090 \\leq A_i \\leq 10^9
  • 1leqxleqN1 \\leq x \\leq N
  • 0leqvleq1090 \\leq v \\leq 10^9
  • All values in input are integers.

Input

Input is given from Standard Input in the following format, where rmqueryi{\\rm query}_i denotes the ii-th query to be processed:

NN QQ A1A_1 A2A_2 ldots\\ldots ANA_N rmquery1{\\rm query}_1 rmquery2{\\rm query}_2 vdots\\vdots rmqueryQ{\\rm query}_Q

Each query is given in one of the following two formats:

11 xx vv 22 xx

Output

Print the answer to the queries, with newlines in between.


Sample Input 1

3 3
1 2 3
2 3
1 2 0
2 3

Sample Output 1

15
9

When the 11-st query is given, A=(1,2,3)A=(1,2,3), so B=(1,3,6)B=(1,3,6), C=(1,4,10)C=(1,4,10), and D=(1,5,15)D=(1,5,15); thus, D3=15D_3=15.

When the 33-rd query is given, A=(1,0,3)A=(1,0,3), so B=(1,1,4)B=(1,1,4), C=(1,2,6)C=(1,2,6), and D=(1,3,9)D=(1,3,9); thus, D3=9D_3=9.


Sample Input 2

2 1
998244353 998244353
2 1

Sample Output 2

0