#arc111f. [arc111_f]Do you like query problems?

[arc111_f]Do you like query problems?

Problem Statement

Yosupo loves query problems. He made the following problem:


A Query Problem

We have an integer sequence of length NN: a1,ldots,aNa_1,\\ldots,a_N. Initially, ai=0(1leqileqN)a_i = 0 (1 \\leq i \\leq N). We also have a variable ansans, which is initially 00. Here, you will be given QQ queries of the following forms:

  • Type 1:

    • ti(=1)t_i (=1) lil_i rir_i viv_i

    • For each j=li,ldots,rij = l_i,\\ldots,r_i, aj:=min(aj,vi)a_j := \\min(a_j,v_i).

  • Type 2:

    • ti(=2)t_i (=2) lil_i rir_i viv_i

    • For each j=li,ldots,rij = l_i,\\ldots,r_i, aj:=max(aj,vi)a_j := \\max(a_j,v_i).

  • Type 3:

    • ti(=3)t_i (=3) lil_i rir_i

    • Compute ali+ldots+aria_{l_i} + \\ldots + a_{r_i} and add the result to ansans.

Print the final value of ansans.

Here, for each query, 11 leq\\leq lil_i leq\\leq rir_i leq\\leq NN holds. Additionally, for Type 1 and 2, 00 leq\\leq viv_i leq\\leq M1M-1 holds.


Maroon saw this problem, thought it was too easy, and came up with the following problem:


Query Problems

Given are positive integers N,M,QN,M,Q. There are (frac(N+1)N2cdot(M+M+1))Q( \\frac{(N+1)N}{2} \\cdot (M+M+1) )^Q valid inputs for "A Query Problem". Find the sum of outputs over all those inputs, modulo 998,244,353998{,}244{,}353.


Find it.

Constraints

  • 1leqN,M,Qleq2000001 \\leq N,M,Q \\leq 200000
  • All numbers in input are integers.

Input

Input is given from Standard Input in the following format:

NN MM QQ

Output

Print the answer.


Sample Input 1

1 2 2

Sample Output 1

1

There are 2525 valid inputs, and just one of them - shown below - results in a positive value of ansans.

$t_1 = 2, l_1 = 1, r_1 = 1, v_1 = 1, t_2 = 3, l_2 = 1, r_2 = 1$

ansans will be 11 in this case, so the answer is 11.


Sample Input 2

3 1 4

Sample Output 2

0

Sample Input 3

111 112 113

Sample Output 3

451848306