Given an array $$$a$$$ of size $$$n$$$, we consider
$$$$$$f(x) = (x \% a_1) + ((x \% a_1) \% a_2) + (((x \% a_1) \% a_2) \% a_3) + \ldots + ((\ldots (x \% a_1) \ldots) \% a_n)$$$$$$.
Where we define $$$x \% y$$$ as the remainder of the integer division of $$$x$$$ by $$$y$$$.
We also have $$$Q$$$ questions of two types.
The first line contains $$$T$$$, the number of cases.
Each case begins with two integers, $$$n$$$ and $$$Q$$$.
The next line of each case contains $$$n$$$ integers $$$a_1, \ldots, a_n$$$.
The following $$$Q$$$ lines of each case contain the questions. Each line begins with an integer representing the type of the question (1 or 2), followed by an integer $$$q_i$$$ if the question is of type 1 or two integers $$$p$$$, $$$x$$$ if it is of type 2.
For each question of type 1, we must respond with a single line with $$$f(q_i)$$$.
2 3 2 2 1 1 1 3 1 4 3 3 6 4 2 1 5 2 2 5 1 5
1 0 7 5
$$$1 \le T \le 10^5$$$.
$$$1 \le n, Q \le 10^5$$$.
The sum of $$$n$$$ for all cases is at most $$$10^5$$$.
The sum of $$$Q$$$ for all cases is at most $$$10^5$$$.
$$$1 \le a_i, q_i \le 10^{11}$$$.
For each question of type 2, $$$1 \le p \le n$$$, $$$1 \le x \le 10^{11}$$$.