You are given two integer sequences $A_1, A_2, \ldots, A_N$ and $B_1, B_2, \ldots, B_M$. For any two sequences $U_1, U_2, \ldots, U_p$ and $V_1, V_2, \ldots, V_q$, we define
Score(U,V)=∑i=1p∑j=1qUi⋅Vj.Score(U,V)=∑i=1p∑j=1qUi⋅Vj.Score(U, V) = \sum_{i=1}^p \sum_{j=1}^q  U_i \cdot V_j \,.
You should process $Q$ queries of three types:
- $1$ $L$ $R$ $X$: Add $X$ to each of the elements $A_L, A_{L+1}, \ldots, A_R$.
- $2$ $L$ $R$ $X$: Add $X$ to each of the elements $B_L, B_{L+1}, \ldots, B_R$.
- $3$: Print $Score(A, B)$ modulo $998,244,353$.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains two integers, $N$ and $M$, denoting the length of $A$ and $B$ respectively.
- The second line contains $N$ integers, elements of $A$.
- The third line contains $M$ integers, elements of $B$.
- The next line will contain an integer, $Q$, number of queries.
- Each of the next $Q$ lines will contain one of $3$ kinds of updates as mentioned in the statement
It’s guaranteed that each update is a valid update operation.

-----Output-----
For each query of the third type, print a single line containing one integer - the answer to that query.

-----Constraints-----
- $1 \le T \le 10$
- $2 \le N, M, Q \le 10^5$
- $0 \le |A_i|, |B_i|, |X| \le 10^5$

-----Example Input-----
1
3 4
2 -1 5
3 3 2 4
6
3
1 2 3 -2
3
1 1 3 1
2 2 4 2
3

-----Example Output-----
72
24
90

-----Explanation-----
Before the first operation, $A = [2, -1, 5],\ B = [3, 3, 2, 4]$
So, for the first operation,
$Score(A,\ B) = 2*3 + 2*3 + 2*2 + 2*4$ $+ (-1)*3$ $+ (-1)*3$ $+ (-1)*2$ $+$ $(-1)*4$ $+  5*3$ $+ 5*3$ $+ 5*2$ $+ 5*4$ $= 72.$
After the second query $A = [2, -3, 3]$, $B = [3, 3, 2, 4]$
So, for the third query, $Score(A, B) = 2*3 + 2*3 + 2*2$ $+ 2*4$ $+ (-3)*3$ $+ (-3)*3$ $+ (-3)*2$ $+ (-3)*4$ $+  3*3$ $+ 3*3$ $+ 3*2$ $+ 3*4$ $= 24$.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '# cook your dish here\nimport sys\ninput = sys.stdin.readline\nmxn=998244353\nfor _ in range(int(input())):\n n,m=list(map(int,input().split()))\n a=list(map(int,input().split()))\n b=list(map(int,input().split()))\n s1=sum(a)%mxn\n s2=sum(b)%mxn\n for q in range(int(input())):\n  ls=input().split()\n  if int(ls[0])==3:print((s1*s2)%mxn)\n  else:\n   t,l,r,x=list(map(int,ls))\n   if t==1:\n    s1=(s1+(r-l+1)*x)%mxn\n   else:\n    s2=(s2+(r-l+1)*x)%mxn\n\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13587